Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Trying to put a Command Button into a Toolbar for a Template
Hi,
I have created a Word template and created a macro that runs some VB code which inserts a link which includes todays date into the document automatically. The code works fine. I then create a new toolbar with a button that runs the macro code. Everytime I try to save the template with the new toolbar and re-open it, the new tool bar is completely missing. Does anyone know what Word is doing here? |
#2
|
|||
|
|||
Hi ?B?R0xU?=,
I have created a Word template and created a macro that runs some VB code which inserts a link which includes todays date into the document automatically. The code works fine. I then create a new toolbar with a button that runs the macro code. Everytime I try to save the template with the new toolbar and re-open it, the new tool bar is completely missing. The most common reason for this is that the toolbar was not saved in the template with the macro code, but in the default (Normal.dot) template. Are you certain your template is selected from the dropdown list when you create the new toolbar? And also when you assign the macro to a toolbar button? And you have checked in the View/Toolbars list? 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 :-) |
#3
|
|||
|
|||
Hi Cindy,
Thanks for your advise. I have worked out what I was doing wrong. Every time I opened my template I double clicked on the template document which then opened it as a .doc document. I now open the template via the FileOpen and it remains a template which then allows me to update and save it. Thanks for your help, GLT. "Cindy M -WordMVP-" wrote: Hi ?B?R0xU?=, I have created a Word template and created a macro that runs some VB code which inserts a link which includes todays date into the document automatically. The code works fine. I then create a new toolbar with a button that runs the macro code. Everytime I try to save the template with the new toolbar and re-open it, the new tool bar is completely missing. The most common reason for this is that the toolbar was not saved in the template with the macro code, but in the default (Normal.dot) template. Are you certain your template is selected from the dropdown list when you create the new toolbar? And also when you assign the macro to a toolbar button? And you have checked in the View/Toolbars list? 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 :-) |
#4
|
|||
|
|||
G'day GLT ,
You have to set the customization context (Save the changes in...) to your template before making the modification. At the moment, you have probably snarled up normal.dot, your word data key in the registry and your template. Additionally, you should name your new commandbars soon after creation by using some Immediate Window VBA. Steve Hudson - Word Heretic steve from wordheretic.com (Email replies require payment) Without prejudice GLT reckoned: Hi, I have created a Word template and created a macro that runs some VB code which inserts a link which includes todays date into the document automatically. The code works fine. I then create a new toolbar with a button that runs the macro code. Everytime I try to save the template with the new toolbar and re-open it, the new tool bar is completely missing. Does anyone know what Word is doing here? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adobe Acrobat on Toolbar in Normal Template | Microsoft Word Help | |||
Web Toolbar shows when document opened via hyperlink | Microsoft Word Help | |||
Outlining Toolbar keeps disappearing | Microsoft Word Help | |||
New Macros don't appear on toolbar for all users | Microsoft Word Help | |||
Toolbar problem | Microsoft Word Help |