Macro name different in Organizer

G

Guest

Hello,

I have created a recorded macro and named it. However, when I look in the
Organizer, it just has "new macro" and "new macro 1" Why is my new macro not
showing up in the Organizer?

Also, do I have to save the macro to a template or can I just save it in a
document?

When I add the macro to a toolbar, it will not run from there - I get the
security setting error message even though security is set to medium.
However, it will run from Tools-macro-macros when I select it in the list and
click Run. Why is this?

Thanks for your help,
Tara
 
G

Guest

Hi Graham,

Thanks for the reference. This site is great! I have a question though -
there was one instruction I did not understand - "5 Copy the complete block
of code from the newsgroup message to the clipboard" - I'm not sure what
block of code that is - what newsgroup message? Please clarify.

Also - are these instructions necessary if I have just created a recorded
macro? I have never done anything with the actual code. Would it be easier if
I saved all new macros to All Documents (Normal.dot) when I record them so
that I never have to move them around?

Thanks for your help - I feel like I'm getting closer!
Tara
 
J

Jay Freedman

Hi Tara,

In the first paragraph of the article on Graham's web site, he says
"in the Microsoft Word newsgroups you may be offered macro listings."
That's what he meant by "the newsgroup message" in step 5. The same
technique works with macro listings you find on web pages such as
Graham's.

When you record a macro, the default is to place it in a module named
NewMacros, which is stored in Normal.dot. Because it's the default --
you don't have to do anything extra to get it there -- that's
certainly the easiest method. But it's like dumping all your tools
into the "junk drawer" -- it makes it harder to find the one you want
when you need it.

It's much better in the long run to organize your macros into
different templates, and within each template to group them into
different modules. You can do this at the time you create a new macro,
or you can move it later. Beth Melton has a great article about this
at http://www.word.mvps.org/FAQs/MacrosVBA/OrganizeMacros.htm.

One other tip: The macro recorder is a starting place, but the macros
it makes tend to be loaded with unnecessary junk, and sometimes
they're just plain wrong. Read
http://www.word.mvps.org/FAQs/MacrosVBA/ModifyRecordedMacro.htm for
the details.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
G

Guest

Hi Jay,

I appreciate your response and the links you sent me. However, I am now
totally confused. What I'm missing is, how do I find the macro I want? I
can't find it in the template I saved it to. I understand it is saved in a
project, and the project could be named any of "NewMacro" "Macro1" or
"Macro2" but how do I know which one? Also, how can I copy the template for
use by others if the macro does not go with it and when I try to move these
projects to the "shared" template, it won't let me overwrite the ones that
are there. I'm really trying to understand, but something is not clicking.
Can you please help fill in the gaps for me?

Thanks,
Tara
 
J

Jay Freedman

Hi Tara,

It's a shame there isn't some kind of "table of contents" for macro modules.
Here's one quick way to find a macro by name:

- Open the Tools > Macro > Macros dialog (shortcut = Alt+F8), check that the
"Macros in" box says "All active templates and documents", and click once on
the macro's name in the list.

- If the Edit button becomes active, click it to open the macro code. Then
the Project pane in the VBA editor will show you which module it's in.

- If the Edit button stays inactive, that means the macro is in an add-in
template. Go to the Tools > Templates and Add-ins dialog to see which
templates are there. You'll have to use the File > Open dialog and navigate
to Word's Startup folder to open the add-in directly, and then you'll be
able to use the Edit button in the Macros dialog.

If a macro is saved in a module within a template, and you copy the template
file (some file with a .dot extension), then the macro *will* go with it.
You can copy a whole module from one template to another by using the
Organizer; or you can copy the code of a macro from the VBA editor to the
clipboard, then open a different module in a different template and paste
the code into the VBA editor there. One other method is to use the Export
and Import commands on the File menu of the VBA editor -- export a module as
a .bas file, and then import that file into another template.

Has that helped to clear the confusion any?

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Guest

Hi Jay - yes, it has cleared up the confusion. Thank you very much for your
help!

Sincerely,
Tara
 

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

Top