History of Word documents

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a feature to open word documents from my vb.net app. Is it possible
that when a user saves a word document, my vb.net app gets the name under
which the document is saved and the date and time of saving, so I can keep a
history of all word documents?

Thanks
 
The best way to do this would be to create a COM add-in for Microsoft Word,
which would run in the background of Word. It could detect when a document
is being saved by handling the DocumentBeforeSave event. In the event
handler, you could write some code to log whatever information you want
(document title, time, etc.)

Here are some links that might help:

HOW TO: Build an Office COM Add-in by Using Visual Basic .NET
http://support.microsoft.com/?kbid=302896

INFO: Develop Microsoft Office Solutions with Visual Studio .NET
http://support.microsoft.com/?kbid=311452

Understanding the Word Object Model from a .NET Developer's Perspective
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/WordObject.asp


--Robert Jacobson
 
Back
Top