D
Dave
I have a C# application that has need to open a word document by automating
word, using COM, and extract the contents of the word document and insert it
into a rich text box in a form. I can easily do this by having Word copy
the contents of the doc to the clipboard, and then pasting the contents into
the rich text box. The problem is that this trashes the previous contents
of the clipboard in the process. I went down the road of trying to save and
restore the clipboard, but had problems with the interaction with the
"Office Clipboard". There may be a way to get that to work (saving and
restoring the clipboard), but it seems like there must be an easier way -
just extracting the contents of the word doc directly. How do you do that?
I see the "Text" property can be used to extract the contents as plain ASCII
text, but what if I want to extract the rich text formatted text?
- Dave
word, using COM, and extract the contents of the word document and insert it
into a rich text box in a form. I can easily do this by having Word copy
the contents of the doc to the clipboard, and then pasting the contents into
the rich text box. The problem is that this trashes the previous contents
of the clipboard in the process. I went down the road of trying to save and
restore the clipboard, but had problems with the interaction with the
"Office Clipboard". There may be a way to get that to work (saving and
restoring the clipboard), but it seems like there must be an easier way -
just extracting the contents of the word doc directly. How do you do that?
I see the "Text" property can be used to extract the contents as plain ASCII
text, but what if I want to extract the rich text formatted text?
- Dave