Hi Charlie,
I don't know whether you can set the onaction property to call a macro
in another document directly (it didn't work for me) but what does
seem possible is to set it to call a macro in the template that houses
the toolbar and have that macro call a macro in the other document.
E.g. somewhere in my toolbar template I have some code like this:
Sub RunThis()
Application.Run MacroName:="MyOtherDocProj.Module1.Test1"
End Sub
I set my control's onaction property to run that sub by executing
something like:
CommandBars("Custom 1").Controls(1).OnAction = "RunThis"
And then my toolbar button can (indirectly) run the macro in the other
doc.
Don't know if this helps.
Cheers.
Ed
> Is it possible to set the .OnAction property of a toolbar button to run a
> macro in a different Word document that is open? The Document name is "SP
> Template" that contains the macro I want to run.
> thanks,
> ck