
Catching File->Open and File->Close
Thanks again.
I was just assuming that if the user is in Word, The user
could be any application which deals with File-Open.
Does that mean, I need to have some kind of a patch for each
application?
Thanks
Mike
Quote:
> Hooks are not going to solve this feature that you want. You need to
> automate Word and use its exposed API to get document and other
information.
> You would be better served to post you questions in a Word or
Automation
> related news group.
> --
> Ajay Kalra
> >Thanks for your reply,
> >This is what I am trying to do and I am not sure this can do it or
not.
> >1. Assuming the user is in MSWORD
> >2. When the user selects File->Open to open a word document.
> >3. I need to catch the name of the file
> >4. Update some line to the document(Which includes, adding, removing,
> >etc. lines from the word document)
> >5. Then display the new word document to the user
> >6. When the user selects File->Close to close the document
> >7. I would like to catch the name of the file and perform similar
> >operation on the word document.
> >Can I use the SetWIndowsHookEx()to solve this? If so should I be
using
> >the (WH_GETMESSAGE) or should I be using the (WH_CALLWNDPROC)
function.
> >Thanks again
> >Mike
> >> Install a hook(SetWIndowsHookEx()) to get messages (WH_GETMESSAGE)
for
> >all
> >> windows (or for that process). Look for WM_COMMAND with appropriate
ID
> >> (File, New etc) for t the window you are interested in.
> >> --
> >> Ajay Kalra
Quote:
> >> >How can I do this?
> >> >When a user is in any application, like Word, Excel, etc.and when
the
> >> >user selects File->Open to open
> >> >a file or File->Close to Close a file. I want my program to be
> >notified.
> >> >What is the best way to it?
> >> >Thanks
> >> >Mike
> >> >Sent via Deja.com http://www.deja.com/
> >> >Share what you know. Learn what you don't.
> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.