Thread: macro button
View Single Post
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jack B Jack B is offline
external usenet poster
 
Posts: 34
Default macro button

Suzanne,

If you didn't specify any other module to save it in, it will be saved in
the NewMacros module of Normal.dot


Ahh, I never was sure what that was all about - ok, so that's default.
Well, in trying to put a macro in its own module, I wiped out some other
macros in the past.

I guess what I need to do if want to put a macro in own module is
1) open the VBA Editor (Alt+F11) -- in my case, doing that gives me a blank
situation (no module to edit or create),
2) then go to the menu bar, click Insert and click on Module. But what I
get is a module that the title bar says is "Document1 - Module1 (Code)" and
in the top left drop down is "(General)" and in the top right drop down is
"(Declarations)" -- no quotes around any of that. If I create a macro, the
Declarations changes to the macro name I make. There seems to be no way to
save the macro, except via File/save Doc1.doc, which is the default blank
Word document. Then the macro is apparently associated only with that
document, because the macro shows up in Tools/Macros only when Doc1.doc is
the active document.

If you can explain how to make it part of Normal.dot, that would be
enlightening.

Anyway, for my button situation I did:
Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

Thanks,

Jack



"Suzanne S. Barnhill" wrote in message
...
I'm a VBA dunce myself, but I believe what you need to do is open the VBA
Editor (Alt+F11) and look for your macro. If you didn't specify any other
module to save it in, it will be saved in the NewMacros module of
Normal.dot, which is what opens by default when you open the editor.
Whatever appears after Sub is the name of the macro. Just change that name
to whatever is on the button, and with any luck the button will work.

Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jack B" wrote in message
...
Suzanne --

You're talking to a visual basic Rodney Dangerfield. I tackle something
like this only once in a blue moon, and was lucky to figure out how to
rewrite it without screwing up something else. Seems like a number of
macros are on the same "sheet."

Anyway,
1) I am not sure what to rename the macro. When I move the cursor over

the
button, it says "BB macro." However, I know there can't be any spaces,

and
I'm not sure that "BBmacro" was actually the name. What name do I need to
change it to?
2) To change the name, do I go back to VB and change the name -- that's

it?

Jack


"Suzanne S. Barnhill" wrote in message
...
Why not just rename the macro?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup

so
all may benefit.

"Jack B" wrote in message
...
Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button for

it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor, so

I
created another similar macro using a different name -- call it JBmacro.
How do I make the old button call up JBmacro?

Jack