Copy all styles starting with certain characters? Generic user na

A

AnnieB

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!!
 
D

Doug Robbins - Word MVP

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


--
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
 
A

AnnieB

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!
 

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