word 2007 automation question

  • Thread starter Thread starter Terry
  • Start date Start date
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
 
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
 
Back
Top