i'd like to do the following : whenever a word document is open i need to save it in a way, and then if a user starts typing in it i want to save the time the document is being edited. i'm just on the first phase, and i can't seem to manage detecting when a user opens a document. i tried using Microsoft.Office.Interop.Word, but, in this way i don't want to start word application unless the user opens a document. but, when i want to initialize a Microsoft.Office.Interop.Word.Application, it's the only way i saw possible. is there a way, by using the Microsoft.Office.Interop.Word API to detect event of opening a file by a user ?
i tried the following (obviously it doesn't work, since it's just opens a word office application)
using Word = Microsoft.Office.Interop.Word;
Word.Application oWord = new Word.Application();
oWord.Visible = true;
oWord.DocumentChange += new Word.ApplicationEvents4_DocumentChangeEventHandler(oWord_DocumentChange);
...
private void oWord_DocumentChange()
{
Console.WriteLine("DocumentChange");
}
also, i wanted to maybe use Microsoft.Office.Interop.Word.Document, but couldn't. i started developing a method of my own, but its just seems to be a waste since this api is already build. any help will be great.. thanks.