Re: Intercepting Word Commands, but using Build-in Macro by Klaus
Klaus
Sat Apr 29 00:41:10 CDT 2006
With many commands, you can just use the same name as the command, but with
"WordBasic." in front (say, WordBasic.Bold).
But with dialogs (such as FilePageSetup) that doesn't work. If you really
want to run the built-in command, and not some corresponding VBA code (...
sometimes there are subtle differences), you should be able to use something
like
Application.EnableCancelKey = wdCancelDisabled
WordBasic.ToolsMacro Name:="FilePageSetup", Run:=1, Show:=2
Application.EnableCancelKey = wdCancelInterrupt
Klaus
"Jezebel" <warcrimes@whitehouse.gov> wrote:
> There are no built-in macros. What you trap are built-in commands; but
> each has an equivalent as a method, mostly of the application or document
> object, as -- as Helmut explains -- as a dialog. From your own macro, call
> the actual method you want.
>
>
>
>
> "Lauro" <colasanti@mclink.it> wrote in message
> news:fha252l16t20fjo01fm8r5p40j2aetat7d@4ax.com...
>> I'd like to trap a Word command; and If a condition is true run
>> MyMacro, Else run the regular Word macro.
>>
>> I know that I can trap the build-in macro just using the same name;
>> but then I won't be able to run the old macro anymore.
>>
>> How can I achieve this?
>>
>> thanks, Lauro
>
>