Reading word file in asp.net 1.1
Hi friends,
I m tring to read the word file in asp.net 1.1. I hav search the code for it:
Word.Application app = new Word.ApplicationClass();
object nullobj = System.Reflection.Missing.Value;
object file = @"C:\anuj\Ques.doc";
Word.Document doc = app.Documents.Open(
ref file, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj);
doc.ActiveWindow.Selection.WholeStory();
doc.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string text = data.GetData(DataFormats.Text).ToString();
Console.WriteLine(text);
doc.Close(ref nullobj, ref nullobj, ref nullobj);
app.Quit(ref nullobj, ref nullobj, ref nullobj);
But problemis that asp.net does not have IDataObject interface. It is in asp.net 2.0.
Then how can i solve my problem. pls
regards & thanks
anuj rathi
|