word 2007 automation question

T

Terry

Hello:
using vb.net 2005 and word 2007.
I would like to open a word.docx document
Have a button on a vb.net form that when clicked inserts text on the word
document
Have a button on a vb.net form that when clicked removes the inserted text
on the word document that was inserted above.

I have seen examples that modify the underlying xml and other examples using
word interropt.
Looking for simple suggestion on how to accomp[lish above.
Thanks
T
 
S

Scott M.

Make a reference to the Word Primary InterOp Assembly (PIA).

Instantiate Word in your application.

Use the Word Object Model to interact with the document.

Release all Word objects explicitly and implicitly created using
ReleaseComObject.

-Scott
 

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