View Single Post
  #6   Report Post  
Posted to microsoft.public.word.docmanagement
John McGhie [MVP - Word and Word Macintosh]
 
Posts: n/a
Default Best approach to getting styles into a document

Hi Annie:

Attached Templates are a pain to maintain across a network or if you have
users on a laptop.

Once you have created a document, it makes no further reference to the
styles in the attached template )or any other kind of template) unless you
force it with "Automatically update style on open" when you attach the
template.

If you DO force "Automatically update..." the style definitions are
overwritten with the style definitions in the template each time the
document is opened with the template accessible.

However, when this update occurs, it blows away any paragraph or list
numbering in the document being opened, depending on how that numbering is
performed.

So if you want to deal with style updates by using an attached template, you
need to use field-based numbering rather than list-based numbering.

If instead you attach the template WITHOUT "Automatically update styles..."
you can then write a macro that will run through and "Selectively" add or
update styles from the template each time the document opens.

To get this macro to add styles that are not already in the document, you
would need to identify the style names that may possibly have numbering, and
explicitly NOT involve them in the update. I would enumerate the style
collection in the template and use a Select...Case... based on the style
name, set to do nothing if the style name is one of the styles that has
numbering, otherwise to copy the style in tot he document.

Cheers


On 8/2/06 10:29 AM, in article
, "AnnieB"
wrote:

Yes, thanks, I think we will do that. There are times when users will not go
the copy & paste special route, so I should still plan on a way togte the
styles into the doc they're working on. I'm leaning to attaching the
template. Thank you!

"Daiya Mitchell" wrote:

I would think it would be preferable for the new blank doc to be based on
the template that stores the styles, then they will all be in there
automatically. Since a new blank doc is part of the protocol anyhow....


On 2/7/06 3:01 PM, "AnnieB" wrote:

Hi Richard,

I know how to use Organizer. One of the macros I described uses Organizer.

The need is to have a single button that brings in or makes available to the
active document all "xyzco" styles from the xyzco-styles.dot. My users will
not tolerate the time it takes to pick and choose, and I do not want them to
have a choice. They edit documents from many different sources, internal
and
external, and our protocol is to copy everything except the last paragraph
mark, paste unformatted text into a new blank doc, then apply xyzco styles.

So my question was - is it preferable create a macro using the Organizer to
copy styles OR create a macro which attaches xyzco-styles.dot to the active
doc? Are there any issues surrounding attaching the template vs. copying in
the styles?

:-)



"Richard O. Neville" wrote:

Use Word's built-in Organizer, a very handy utility that is very hard to
find in Word. Go to Tools-Customize, and click the Keyboard button. In the
left menu select Format, in the right FormatStyle (the first of several
Style choices). Assign a keyboard command to it.

Close Customize and press the keyboard command you created. This will bring
up a menu titled just plain "Style." In the lower left corner, click
Organizer. You can open your xyzco document in one of the windows, and the
active document, or any other, in the other window. You can then select
individual styles, or all of the styles, and move them into any document(s)
you want. You can even pick and choose styles to move over by using the
Ctrl
key to select non-contiguous styles.

"AnnieB" wrote in message
...
Word 2003
I need a way to make sure a set of custom styles is easily brought into
the
active document. I have created a template (xyzco-styles.dot) that
contains
the xyzco styles. Which would be the best approach - to use a macro that
copies all styles from xyzco-styles.dot into the active document OR to use
a
macro that attaches the xyzco-styles.dot to the active document?

My tests have shown me that when I attach the template, the styles do not
show up in the active doc unless Automatically update document styles was
checked. Are there any other implications to this choice?

I am tending towards the attach template idea because we may add or remove
styles occasionally and updating a macro that specifically copies styles
would be overhead we don't want to add.

I plan on creating a custom toolbar in an xyzco.dot and that is where the
above mentioned macro would reside. This template would live in the MS
Office Startup folder so the toolbar is available when Word starts.

Am I on track? Thanks!






--
Daiya Mitchell, MVP Mac/Word
Word FAQ:
http://www.word.mvps.org/
MacWord Tips: http://www.word.mvps.org/MacWordNew/
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/



--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410