exchanging styles & macros using organizer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a macro and an associated toolbar button in mytemplate.dot, that automatically formats tables for me. I was expecting that when I go to organizer, the macro would appear in macro project items and I could then copy it to other templates, or documents, but my new macro is not listed, nor is the toolbar button? The only macro listed under mytemplate.dot is "Newmacros".
Not sure what Ive done wrong. Seems like the macro is not saved in the correct place in the template or something.
thanks.
 
Not sure what Ive done wrong. Seems like the macro is not saved in the
correct place in the template or something.

For starters, check where you DID put the macro. If YOU don't know, how can
you expect anyone else to hazard a guess?
 
If you use the macro recorder, or do not create a new module, then all your
macros will go in the NewMacros module. If you wish to separate your macro
then you need to created a module in normal.dot and move it, or you could
open your template and copy and paste the macro between the templates.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G'day Mike B <[email protected]>,

For a macro to show up in that dialog, it needs to be a public sub
from a std code module WITH NO PARMS. Not even optional ones. Its
invocable if its public, but it wont appear on your list. You can type
in the exact name for the OnAction, for eg. and it will work.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Mike B reckoned:
 
In the record new macro dialogue box, Word asked me where to store my new macro called tableformat. I selected mytemplate.dot

When in mytemplate.dot I press ALT-f11 and go to Visual basic editor. I can see the script for tableformat() appears inside: template project >modules>newmacros.

"newmacros" is listed in the organizer. This must be my macro? I was expecting to see its name "tableformat"?
 
Hi Mike

What a polite response to a less than helpful reply.

Yes, the Organizer only shows you complete modules and complete toolbars.
NewMacros is the default module name, as Graham says, so that is where your
macro is - not at all intuitive when you are only been asked for a macro and
template name on recording the macro. The toolbar button will be on the
toolbar you put it on - if that was a standard one you'll need to move it to
a custom toolbar in order to move it around using the Organizer.

You can change the NewMacros module name and/or make new modules and
reorganize the macros from within the Visual Basic editor, but if you do you
will need to recreate your toolbar button so it references the new name.

Note that if you load mytemplate.dot as a global template, your macro and
toolbar button (wherever it is) will be available to all documents, without
duplicating in other templates.

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk


Mike B said:
In the record new macro dialogue box, Word asked me where to store my new
macro called tableformat. I selected mytemplate.dot
When in mytemplate.dot I press ALT-f11 and go to Visual basic editor. I
can see the script for tableformat() appears inside: template project
modules>newmacros.

"newmacros" is listed in the organizer. This must be my macro? I was
expecting to see its name "tableformat"?
 
Hi Steve,

I think you are describing the list in the Macros dialog (which shows macro
and command names), not the list in the Organizer, which shows only modules.

Useful info though :-)

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk


Word Heretic said:
G'day Mike B <[email protected]>,

For a macro to show up in that dialog, it needs to be a public sub
from a std code module WITH NO PARMS. Not even optional ones. Its
invocable if its public, but it wont appear on your list. You can type
in the exact name for the OnAction, for eg. and it will work.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Mike B reckoned:
mytemplate.dot, that automatically formats tables for me. I was expecting
that when I go to organizer, the macro would appear in macro project items
and I could then copy it to other templates, or documents, but my new macro
is not listed, nor is the toolbar button? The only macro listed under
mytemplate.dot is "Newmacros".
 
I would hope that you feel *worse* now that your initial unhelpful rudeness
has been compounded by this ungracious follow-up. Margaret was not showing
off; she was answering the OP's question thoroughly and in a way that he
could understand.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Hi Jezebel

Sorry if I ruffled your feathers, but it seemed to me the OP was quite clear
about where he had saved his macro, and it's not his fault that Word doesn't
show your recorded macro name in the Organizer - you get no choice over
module name when you record the macro, so that's the first time you see
'NewMacros'. I don't mean to be patronising, but I really wanted to give
some encouragement for having gone away and found out some more information,
and for posting back for confirmation - made a pleasant change from 'Word
isn't working' posts :-)

Your knowledge is much more technical than mine and I often learn from it,
but maybe this time you forgot what it's like to put your first foot into
macro recording, long before you have seen a project or a module.
 
G'day "Margaret Aldis" <Margaret.Aldis@mvps.(SpamStopper)org.invalid>,

Doh! Right u r again, pass me some of them MVP pills, my doctor
refuses to prescribe me any more :-)

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)
 
Thankyou all for your help.
I went into mytemplate.dot, VB editor, newmacros and copied the script for tableformat().
I then created a new module called tableformat and pasted the script here.
This worked a treat as predicted, and now tableformat appears in the organizer.

Yes Margaret, I had indeed placed the button on a standard (table) toolbar. If I create a custom one for it, will the toolbar & button be visible automatically when other users attach mytemplate.dot ?



MB.
 
Hi Mike

The toolbar button will be visible when mytemplate.dot is active (attached
to the current document, or loaded as a global) whether you have put it on a
standard toolbar or on a custom one. (You might possibly need to use an
automatic macro (AutoOpen & AutoNew for a document template, AutoExec for a
global one) to force the custom toolbar to be visible when you start, but
you'll probably get away without doing that.)

However, if you want to copy the toolbar button using the Organizer, then
you'll need to put it on a custom toolbar and copy that - you can't copy
customizations of the standard bars. (You can of course move the button back
to the standard toolbar in the new template, using Tools > Customize).

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk


Mike B said:
Thankyou all for your help.
I went into mytemplate.dot, VB editor, newmacros and copied the script for tableformat().
I then created a new module called tableformat and pasted the script here.
This worked a treat as predicted, and now tableformat appears in the organizer.

Yes Margaret, I had indeed placed the button on a standard (table)
toolbar. If I create a custom one for it, will the toolbar & button be
visible automatically when other users attach mytemplate.dot ?
 
Word Heretic said:
Doh! Right u r again, pass me some of them MVP pills, my doctor
refuses to prescribe me any more :-)

LOL - very wise - addictive and hallucinogenic, not to mention the
flatulence ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top