HI Guys
How to open a word file and HTML file (Without tags) into
richtextbox control.file is opening by this code but it is opening in
plaintext format but i want to open in word format
IDataObject Data1;
object nullobj,file;
WordApp=new Word.ApplicationClass();
nullobj=Missing.Value;
file =strFileName1;
WordDoc = WordApp.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,ref nullobj);
WordDoc.ActiveWindow.Selection.WholeStory();
WordDoc.ActiveWindow.Selection.Copy();
Data1= Clipboard.GetDataObject();
str= Data1.GetData(DataFormats.StringFormat).ToString() ;
richTextBox2.Text = str;
Console.WriteLine(str);
WordDoc.Close(ref nullobj, ref nullobj, ref nullobj);
pla somebody help me.
Twinkle