Microsoft.Office.Interop.Word.Document
(1)
Office
(1)
Word
(1)
VB.NET
(1)
DsoFramer.ActiveDocument
(1)
ActveDocument
(1)
CType
(1)
Burgazon
(1)

Text format using DSO Framer

Asked By Burgazo
11-Jun-08 08:43 AM
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

Yes it is. I usually use VB.NET.

Asked By DirkFrull
24-Jun-08 11:44 AM
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 :)
Post Question To EggHeadCafe