#1   Report Post  
Posted to microsoft.public.word.docmanagement
Michelle Michelle is offline
external usenet poster
 
Posts: 151
Default Word 2007 macros

I used to make macros in 2003 with the suffix of .MAIN. This allowed me to
copy individual macros from one template to another, one computer to another.
If I failed to use the .MAIN, I was given only the choice of NEWMACROS to
copy. Of course, if the destination also had NEWMACROS, they'd be
overwritten.

Now I am trying to do the same with 2007. I created 4 macros with .MAIN
suffix and put them on the Quick Access Toolbar (with a view to putting the
same macros on three different computers). However, whichever macro I click
on, they are all the same macro. If I run them from Macro, Play, they work
perfectly, but on the toolbar, they all think they are the same macro! This
is very frustrating to say the least. And whoever at Microsoft came up with
the Quick Access Toolbar (which is something out of Microsoft 1.0) should be
flogged...but I digress.

Can anyone explain (in very easy language please - I am VBA challenged) what
the heck I can do here to a)make the macros behave on the Quick Access
Toolbar and b) how to get them from one computer to another if I can no
longer use the .MAIN suffix (which I have been told is my problem)?

Thanks, Michelle
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Word 2007 macros

I am not sure what you mean by "with the suffix of .MAIN"

Macros are contained in Modules in Templates. You can either install the
template on another machine, but I guess that most likely, you have created
the macros in the Normal.dot template on your machine and I would not
suggest copying that to another machine. In the visual basic editor,
however, you can select the module that contains your macros and then Right
Click and select Export File. That will export the module to a file with
the extension of .bas. You can copy that file to another machine and then
in the visual basic editor on that machine, you can select the template into
which you want to insert those macros and from the File menu, select Import
File and then select the .bas file to be imported.

See the article "Distributing macros to other users€¯ at:
http://www.word.mvps.org/FAQs/Macros...buteMacros.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Michelle" wrote in message
news
I used to make macros in 2003 with the suffix of .MAIN. This allowed me
to
copy individual macros from one template to another, one computer to
another.
If I failed to use the .MAIN, I was given only the choice of NEWMACROS to
copy. Of course, if the destination also had NEWMACROS, they'd be
overwritten.

Now I am trying to do the same with 2007. I created 4 macros with .MAIN
suffix and put them on the Quick Access Toolbar (with a view to putting
the
same macros on three different computers). However, whichever macro I
click
on, they are all the same macro. If I run them from Macro, Play, they
work
perfectly, but on the toolbar, they all think they are the same macro!
This
is very frustrating to say the least. And whoever at Microsoft came up
with
the Quick Access Toolbar (which is something out of Microsoft 1.0) should
be
flogged...but I digress.

Can anyone explain (in very easy language please - I am VBA challenged)
what
the heck I can do here to a)make the macros behave on the Quick Access
Toolbar and b) how to get them from one computer to another if I can no
longer use the .MAIN suffix (which I have been told is my problem)?

Thanks, Michelle


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word 2007 macros

By default, Word saves macros you create in the NewMacros module. When
naming a macro from the macro recorder or the ALT+F8 dialog, you can create
(or use existing modules) by adding a *PREFIX* containing the module name.
If you use the extension '.main' when naming a macro, a macro called 'main'
is created in a module with the name of the body as the module name.
What you should do is use the name of the macro as the 'extension' i.e. if
you want the macro in a module called 'main', name the macro Main.macroname
This was exactly the same in Word 2003.
You should not use duplicate macro names in different modules of the same
template as it creates confusion.
In the case of Word 2007, you are correct that when adding a macro with the
same name from a different module to the QAT (Quick Access Toolbar) that the
one in the NewMacros module takes priority. Whether this is by design or a
bug I am not sure, but the answer is to use unique module names and modules.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Michelle" wrote in message
news
I used to make macros in 2003 with the suffix of .MAIN. This allowed me to
copy individual macros from one template to another, one computer to
another.
If I failed to use the .MAIN, I was given only the choice of NEWMACROS to
copy. Of course, if the destination also had NEWMACROS, they'd be
overwritten.

Now I am trying to do the same with 2007. I created 4 macros with .MAIN
suffix and put them on the Quick Access Toolbar (with a view to putting
the
same macros on three different computers). However, whichever macro I
click
on, they are all the same macro. If I run them from Macro, Play, they
work
perfectly, but on the toolbar, they all think they are the same macro!
This
is very frustrating to say the least. And whoever at Microsoft came up
with
the Quick Access Toolbar (which is something out of Microsoft 1.0) should
be
flogged...but I digress.

Can anyone explain (in very easy language please - I am VBA challenged)
what
the heck I can do here to a)make the macros behave on the Quick Access
Toolbar and b) how to get them from one computer to another if I can no
longer use the .MAIN suffix (which I have been told is my problem)?

Thanks, Michelle



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
using macros in word 2007 Shazza Microsoft Word Help 2 September 28th 09 05:09 PM
Macros in Word 2007 RwsRichard Microsoft Word Help 0 December 23rd 07 11:17 PM
Sharing Word 2007 macros with Outlook 2007 krygim New Users 0 November 14th 07 02:36 AM
Macros in Word 2007 Technically Challenged Microsoft Word Help 4 April 4th 07 02:43 PM
Word 2007 Macros Steved Microsoft Word Help 1 December 4th 06 12:07 PM


All times are GMT +1. The time now is 12:19 PM.

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"