After launching word.application from VFP6, is is possible
to trap (say the date) whenever either the 'Send a Copy'
or the 'Print' functions of a Word document have been
'clicked' by the user?
As Craig says, the EventHandler() function would do this -- it lets you trap any event in a COM server -- but it is only available in VFP 7.0 or later.
Another possibility might be to add a macro to the Word document. The macro would write the required information (such as the date) to a "hidden" part of the document. That could be a comment, or simply a piece of text formatted with the same colour as the background. Your Automation code could then search for and read that text.
From what I know of your application, your users are creating documents on the fly, so the macro could not reside in the document itself. Instead, you could put it in a template, and your Automation code could then ensure that all new documents are based on that template. I can't give you much more information, because I'm not a Word macro expert, but I hope this will get you started.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.