Hi Chuck,
When you say to intercept Word's built-in FileSave
and FileSaveAs commands, are you suggesting that I handle the
Microsoft.Office.Interop.Word.ApplicationClass.ApplicationEvents2_Event_Docum
entBeforeSave
event? Is it possible to intercept any arbitrary built-in command or just
those events that are currently defined in the Microsoft.Office.Interop.Word
namespace?
From the .NET interface you can only intercept the events.
IF you are allowed to put code in the document's or template's VBA project,
then you can intercept the builtin commands. When you used the term "template
project" in your original message, I assumed you meant the VBA project. Peter
apparently knew better <g>, and assumed y .NET (VSTO?) project.
If a Word VBA project contains a procedure with the same name as a built-in
command, that procedure will intercept the built-in command. This capability
comes from the old WordBasic days; we Word-programmers were happy to see it
survive the transition to VBA, but it's been progressively neglected with
each new version since 97. So I fear it may eventually be phased out...
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail