Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

copy macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Susan Taylor - 18 Sep 2006 07:04 GMT
I need to copy users old macros and toolbars from one location to another.  
Has anyone done something like this?  My goal is to automate the process so
that the individual only needs to click a button to copy over all of their
macros and toolbars.
Any guidance would be very much appreciated.
regards,

Signature

sallisontaylor

Cindy M. - 18 Sep 2006 09:58 GMT
Hi =?Utf-8?B?U3VzYW4gVGF5bG9y?=,

> I need to copy users old macros and toolbars from one location to another.  
> Has anyone done something like this?  My goal is to automate the process so
> that the individual only needs to click a button to copy over all of their
> macros and toolbars.

It really depends on WHERE they've saved these customizations. The default
location would be the Normal.dot template. In that case, simply copy the
Normal.dot file to the other location...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)
Susan Taylor - 19 Sep 2006 00:29 GMT
We have had some issues with normal.dot corruption and because we are moving
from Word XP to Word 2003, I was hoping to copy just the macros and toolbars
( I have code to copy the autotext) to a new normal.dot.  The old normal dot
is backed up as part of the word migration process.

Signature

sallisontaylor

> Hi =?Utf-8?B?U3VzYW4gVGF5bG9y?=,
>
[quoted text clipped - 14 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Cindy M. - 19 Sep 2006 12:26 GMT
Hi =?Utf-8?B?U3VzYW4gVGF5bG9y?=,

> We have had some issues with normal.dot corruption and because we are moving
> from Word XP to Word 2003, I was hoping to copy just the macros and toolbars
> ( I have code to copy the autotext) to a new normal.dot.  The old normal dot
> is backed up as part of the word migration process.
>  
I recommend using the Tools/Templates and Add-ins/Organizer for this. The VBA
equivalent is Organizer.Copy

But if you're concerned about corruption, it might even be better to use the VB
Editor's File/Export and File/Import to transfer the macro stuff. This will go
over plain text files. Doing this programmatically means automating the VBE
(Extensibility, the Visual Basic Editor stuff). For example
   NormalTemplate.VBProject.VBComponents(1).Export

> > > I need to copy users old macros and toolbars from one location to another.  
> > > Has anyone done something like this?  My goal is to automate the process so
[quoted text clipped - 4 lines]
> > location would be the Normal.dot template. In that case, simply copy the
> > Normal.dot file to the other location...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)
Jonathan West - 19 Sep 2006 13:01 GMT
> We have had some issues with normal.dot corruption and because we are
> moving
[quoted text clipped - 3 lines]
> dot
> is backed up as part of the word migration process.

You might like also to take a look at this article

Distributing macros to other users
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Susan Taylor - 20 Sep 2006 02:49 GMT
thank you for the responses -
My goal is not to distribute macros, but rather to copy the users own macros
and toolbars from a old normal.dot to a new normal.dot.
******************************
this is what I came up with using the organizer - the issues are
1. should I be using import instead?
2. if the destination file already has the same name of macro ( newmacros)
then I have issues ( so to speak).

Recommendataions and advise would be greatly appreciated.

thank  you,

Signature

sallisontaylor

> > We have had some issues with normal.dot corruption and because we are
> > moving
[quoted text clipped - 8 lines]
> Distributing macros to other users
> http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
Jonathan West - 21 Sep 2006 13:37 GMT
> thank you for the responses -
> My goal is not to distribute macros, but rather to copy the users own
[quoted text clipped - 9 lines]
>
> thank  you,

My advice is that you *don't use normal.dot*

Move the code and toolbars into a new template. Place that template in
Word's Startup folder. When Word next starts, the template will load as an
add-in and all the macros and toolbars will be available to the user. The
risk of everything going wrong because of a normal.dot corruption is
minimised, and normal.dot can return to its proper function, which is to act
as a default storage location for individuals' own customizations.

If you approach it this way, you don't have to distribute macros, don't have
to worry about whether the transfer between templates works or not. All you
need do is copy the complete template to the appropriate location on each
PC, replacing the older version of necessary. This is much less susceptible
to problems.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Susan Taylor - 22 Sep 2006 01:34 GMT
Jonathan,
thank you for responding to my questions.  I have read the article on
distributing macros, and we do distribute macros to users by copying the
templates/add-ins to the start up folder.  But users like to make some of
their own macros and toolbars and they store those in the normal.dot.  Now
that we are upgrading from office xp to office 2003 I thought it would be
wise to give them new normal.dots and copy any of their personal autotext and
macros and toolbars to the new normal.dot.
I have been able to automate the copying of the users personal autotext but
the macros and toolbars have been more complex.
Even if I choose to make their personal autotext, macros and toolbars into
an add-in instead of using the normal.dot and then copies the template using
a batch file or login script I would still have to copy the existing personal
autotext, macros and toolbars for each person into a new template.
That is why I am attempting to find a way to copy.
Susan
Signature

sallisontaylor

> > thank you for the responses -
> > My goal is not to distribute macros, but rather to copy the users own
[quoted text clipped - 24 lines]
> PC, replacing the older version of necessary. This is much less susceptible
> to problems.
Shauna Kelly - 23 Sep 2006 02:47 GMT
Hi Susan

You can copy toolbars with something like:
   Application.OrganizerCopy Source:="c:\whatever\Normal.dot", _
       Destination:= "C:\whatever\NewFile.dot", _
       Name:="MyToolbarName", _
       Object:= wdOrganizerObjectCommandBars

To get the name of the toolbar to copy, you could cycle through all the
existing CommandBars. When you hit one where the .BuiltIn property is false,
you know it's a custom toolbar. To avoid copying the command bars of any
add-ins, use Tools > Templates and Add-ins to unload them first.

Many people recommend the following tool to copy keyboard shortcuts (though
I personally have never used it):
http://www.chriswoodman.co.uk/Shortcut%20Organizer.htm

Copying macros is much harder. The Organizer only copies individual
routines, not modules. And it can't see any code in ThisDocument. As Cindy
said, you may be better off importing and exporting the individual modules.
For some ideas, have a look at
http://word.mvps.org/faqs/macrosvba/TemplateBloat.htm.

By the way, don't forget to copy user's AutoCorrect files, too. For more
information, see
What files do I need to back up?
http://www.word.mvps.org/FAQs/General/FilesToBackup.htm

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> Jonathan,
> thank you for responding to my questions.  I have read the article on
[quoted text clipped - 51 lines]
>> susceptible
>> to problems.
Susan Taylor - 04 Oct 2006 15:36 GMT
Shauna,
These references have been very helpful.  I am making some progress with
this task!  Also, thanks for the reminder regarding the auto correct settings.

I appreciate your assistance.
Thank you,
Susan
Signature

sallisontaylor

> Hi Susan
>
[quoted text clipped - 84 lines]
> >> susceptible
> >> to problems.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.