GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  DotNet
Go To First  |  Previous Question  |  Next Question 
 DotNet  |  Question 103 of 165    Print  
How can i read .doc document in ASP.Net?
----


  
Total Answers and Comments: 3 Last Update: March 15, 2006     Asked by: Harshad 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 17, 2005 08:06:23   #1  
prasanna V        

RE: How can i read .doc document in ASP.Net?
using Microsoft Office Object Library
 
Is this answer useful? Yes | No
March 05, 2006 04:38:51   #2  
vishal sharma        

RE: How can i read .doc document in ASP.Net?

you can read from a text file like this.

private void Button12_Click(object sender System.EventArgs e)

{

string path C:\\Inetpub\\new1.txt ;

using(StreamReader reader new StreamReader(path))

{

string line;

while ((line reader.ReadLine())! null)

{

Label2.Text+ <br> +line;

}

}

}

from .doc file try yourself


 
Is this answer useful? Yes | No
March 15, 2006 06:46:31   #3  
Diju Member Since: March 2006   Contribution: 8    

RE: How can i read .doc document in ASP.Net?
Private Sub button1_Click(sender As Object e As System.EventArgs)' Use the open file dialog to choose a word documentIf Me.openFileDialog1.ShowDialog() DialogResult.OK Then' set the file name from the open file dialogDim fileName As Object openFileDialog1.FileNameDim readOnly As Object FalseDim isVisible As Object True' Here is the way to handle parameters Dim missing As Object System.Reflection.Missing.Value' Make word visible so you can see what's happening WordApp.Visible True' Open the document that was chosen by the dialogDim aDoc As Word.Document WordApp.Documents.Open(fileName missing [readOnly] missing missing missing missing missing missing missing missing isVisible) ' Activate the document so it shows up in front aDoc.Activate();' Add the copyright text and a line breakWordApp.Selection.TypeText( Copyright C# Corner )WordApp.Selection.TypeParagraph()End IfEnd Sub 'button1_Click
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape