Hi Jerry:
from "Jerry said:
Generating and cloning styles in Word X is SO time-consuming, going through
the hierarchy of dialog boxes.
Yeah, tell me about it
Word 6 for DOS was the last one that enabled
table-entry of style parameters. Various people have macros that will do
it, but they charge for them. We have been requesting a return of this
feature for some years, without success
For example, I want to generate 9 different "outline level" styles which
will all be similar to one another, except have a different indentation.
Arghhh!!! It's going to take me 20 minutes.
Now, maybe this is a good time for a note of caution. If your "Outline"
styles are NOT the "built-in" Heading 1 through Heading 9 styles, you will
get constant grief. Nothing about your formatting or numbering will ever be
reliable.
So make a Design Decision now: USE the built-in Heading styles
You can
customize them within an inch of their lives: you can format them any way
you want. But use the built-in styles.
Or you can spend the next two years suffering constant grief and crashes and
corruptions and inconsistent formatting. And then you can make a decision
to adopt the built-in styles
Sorry mate, I've been doing this since 1973: I know this road well
Does anyone know a way to generate and clone styles using a spreadsheet-type
of entry format? Or maybe to import them as a text file? Are there any VBA
tricks which might help?
Yes. If all you want to do is copy style definitions to a different
document or template, you can use the Organizer tool to do that. The
instructions are in the help. Note that to copy numbering, you must copy
the style TWICE without moving your selection. To copy an Outline list, you
must copy all NINE styles at once, twice, without moving your selection.
Otherwise you do not bring in the list template.
To make a tool to define styles, while you are spending the 20 minutes, turn
your Macro Recorder on. Don't worry about getting the definitions
"correct", you can fix them later. Just make sure that you make "a change"
in each section of the dialog for each style. When you have finished, stop
the recorder and save the result. You now have a text file that will define
all of your styles perfectly.
You can edit this file in the VBA editor, or you can export it as a text
file and edit it in any other text editor you choose. When you edit it
externally, or export it for use on another computer, you can import it to
the VBA editor. The file name must have the extension ".bas" for the VBA
editor to recognise it (because it's a text file, it MUST have an
extension).
To make a new set of styles, simply copy and edit the macro you just
recorded.
Be careful of the order in which you do things: Define the styles first,
ensure you define the numbering second, and ensure that you define an
associated style for each level of numbering. Otherwise the macro will run
VERY slowly on a large (greater than 1,000 pages...) document.
What I have given you here is a very superficial overview
Stay close to
this group and we'll be delighted to give you the rest of it. In the
meantime, read everything you can in the Word Help: it's the only complete
and up-to-date set of documentation there is for Word. Then read everything
you can at
www.mvps.org/word. Ignore the fact that most of the stuff there
is about PC Word: the only material differences are that Mac Word does not
have full Unicode, or some of the VBA commands that PC Word has.
Hope this helps
--
All Spam and attachments blocked by Microsoft Entourage for Mac OS X. Please
post replies to the newsgroup to maintain the thread.
John McGhie, Microsoft MVP: Word for Macintosh and Word for Windows
Consultant Technical Writer <
[email protected]>
+61 4 1209 1410; Sydney, Australia: GMT + 10 hrs