I need to open an existing Word document from within my VB 2010 application and detect when the user has closed the document in order to copy that document to a database, whether the user modified it or not. How do I accomplish this? Thanks.
Example:
'Code here
Dim word as New Word.Application()
Dim doc as New Word.Document()
'open the document here and let the user work on the word document
'detect when user has closed Word
'copy the word document into database
Here is an example on how to create a new document. Maybe this will get you started?
http://support.microsoft.com/kb/316383
Another good example:
http://www.codeproject.com/Articles/55685/Word-Automation-using-VB-NET-Part-I