![]() |
#1
|
|||
|
|||
![]()
I'm using Word version 2007.
I created a new command bar control that calls a macro like this: With cbcNewMenu.Controls.Add(Type:=msoControlButton) .Caption = "ConvertTable" .OnAction = "mod100Procs.UpdateTable" End With The macro only works on the document that contains the VBA code. If I try to use it on any other document I get a "The macro cannot be found... message. I've tried this: With cbcNewMenu.Controls.Add(Type:=msoControlButton) .Caption = "ConvertTable" .OnAction = "'" & Thisdocument.name & "'!mod100Procs.UpdateTable" End With but that doesn't work. What am I missing? |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PowerPoint 2010 not works | Democrazy | PowerPoint | 0 | 11-26-2010 03:05 AM |
VB code from one document runs on other open documents | beav_35 | Word VBA | 0 | 11-10-2010 02:52 PM |
Converting from Works | Menno Hershberger | Office | 0 | 09-01-2010 11:33 PM |
how can I add a peace of code to MS document | amlife | Word VBA | 0 | 03-03-2010 03:35 PM |
![]() |
mommu | Office | 4 | 01-23-2006 02:40 PM |