Reply
 
Thread Tools Display Modes
  #1   Report Post  
GLT
 
Posts: n/a
Default 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   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

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   Report Post  
GLT
 
Posts: n/a
Default

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   Report Post  
Word Heretic
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adobe Acrobat on Toolbar in Normal Template winddance Microsoft Word Help 2 February 28th 05 04:57 PM
Web Toolbar shows when document opened via hyperlink Julia Chromicz Microsoft Word Help 0 February 1st 05 06:31 PM
Outlining Toolbar keeps disappearing Don Microsoft Word Help 1 January 14th 05 03:06 PM
New Macros don't appear on toolbar for all users Shirley Hommel Microsoft Word Help 2 January 11th 05 04:39 PM
Toolbar problem CarolineJ Microsoft Word Help 1 November 28th 04 01:17 AM


All times are GMT +1. The time now is 03:02 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"