Text format using DSO Framer

B

Burgazon

HI,

I would like to get the text (only the text) of a word document via the DSO
Framer.
The returned value should be similar to saving a WORD document as text (.TXT).
Note that I don't want to save the file to disc as TXT file. I just want to
get the text as a (very long :)) string.

Is it possible?
If so, how?
Burgaz
 
D

Dirk Frulla

Yes it is. I usually use VB.NET. You need to cast the ActveDocument property
like this:


Dim wordDoc As Microsoft.Office.Interop.Word.Document = Nothing
wordDoc = CType(dsoFramer.ActiveDocument,
Microsoft.Office.Interop.Word.Document)

You would then be interested in the wordDoc.Range.Text property.

Hope it helps :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top