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 / February 2006

Tip: Looking for answers? Try searching our database.

Copy all styles starting with certain characters?  Generic user na

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AnnieB - 11 Feb 2006 00:01 GMT
I can record macros, but know zero VBA.  Instead of a macro that copies
certain styles from a template into a document, how can I indicate copy all
styles that start with certain letters - in this case BP?

Also, since the template will be stored in the user's emplate path, how can
I indicate some sort of generic user name? I don't want to have to edit the
macro for every user .

Thank you in advance, I know these are basic questions. Boy, do I feel dumb!!
Doug Robbins - Word MVP - 11 Feb 2006 07:35 GMT
I am not sure that you need a macro to do this.  Just move the styles into
the template using Tools>Macro>Macros>Organiser>Styles.

Then, see the article "Distributing macros to other users" at:

http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm

Signature

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

>I can record macros, but know zero VBA.  Instead of a macro that copies
> certain styles from a template into a document, how can I indicate copy
[quoted text clipped - 9 lines]
> Thank you in advance, I know these are basic questions. Boy, do I feel
> dumb!!
AnnieB - 11 Feb 2006 08:29 GMT
Thanks for the pointer to the article, I will share it with the IT guy.

I need to copy styles as described in my question because I have to create a
button that legal secretaries can click when they are working in a document
that does not have the firm styles already contained within.  We have a
template (firm-styles.dot) containing a set of firm styles.  We may add to
these styles, we probably won't delete or modify any.  The afore-mentioned
button will reside on a simple toolbar (firm toolbar) in a template
(firm.dot).  In another part of this forum several MVPs helped me decide
between copying styles vs. attaching a template - copying was the way to go.  

Since we may add styles, I didn't want to record a macro that copied
specific styles.  I was hoping for a way to copy all styles starting with the
firm's initials (BP).  That way I won't have to edit the macro and then
redistribute it.

That is also what gave rise to my other question ... how do I indicate in
the macro a generic user name?  In other words, the macro should look in the  
logged in user's template path for the firm-styles.dot, instead of looking in
Joe Blow's path (and then I have to edit the macro for every individual
user.)  I want to keep firm-styles.dot in the user template path rather than
as a Workgroup template because there are a number of laptop users at the
office.

Thank you!

> I am not sure that you need a macro to do this.  Just move the styles into
> the template using Tools>Macro>Macros>Organiser>Styles.
[quoted text clipped - 16 lines]
> > Thank you in advance, I know these are basic questions. Boy, do I feel
> > dumb!!

Rate this thread:






 
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.