Dear all,
I would like to make a code which reads a word document and display the rtf contents in a richtextbox.
I wrote the following but i can't find how will i get the rtf data of the Document.
Is it possible or not?
The method:
Word.Document.Content.Text returns a plain text
Is there anything else about that?
Many thanks
object fileName = @"c:\test1.doc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
object savechanges=false;
object originalformat=System.Reflection.Missing.Value;
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
Word.Document oWordDoc = oWordApp.Documents.Open(ref fileName, ref missing,ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing,ref missing,ref missing, ref missing);
// The below Command is a plain Text even the document has tables
oWordDoc.Content.Text;
I would like to make a code which reads a word document and display the rtf contents in a richtextbox.
I wrote the following but i can't find how will i get the rtf data of the Document.
Is it possible or not?
The method:
Word.Document.Content.Text returns a plain text
Is there anything else about that?
Many thanks
object fileName = @"c:\test1.doc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
object savechanges=false;
object originalformat=System.Reflection.Missing.Value;
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
Word.Document oWordDoc = oWordApp.Documents.Open(ref fileName, ref missing,ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing,ref missing,ref missing, ref missing);
// The below Command is a plain Text even the document has tables
oWordDoc.Content.Text;