Issue when you copy outline number style to other document

J

JeePee

Hi,

I have created my own styles in a (new) template. I want
to use these styles in existing documents so I have used
the organizer option from the Tools > Templates and Add
ins option to copy the style to the other document.

All styles are copied, includsing the outline number
style. However, the settings I have enterd in number and
text positions are not copied in the same way I defined
them.

Is this a bug or is there someting I did wrong?

pls reply to (e-mail address removed) by removing
the "nospam4me." section from the email address.

thx
JP
 
M

Margaret Aldis

Hi JeePee

Probably a bug or design flaw in the way styles are linked to list
templates, though if you have styles based on other styles it could simply
be a logical result of the order of copying.

Try copying the styles across two or three times in the Organizer. If that
doesn't work, see the 'Gotchas' section of
http://www.mvps.org/word/FAQs/MacrosVBA/UpdateStyles.htm.
 
J

JeePee

Hi, thank you for the answer. It is not the order of
copying. I had all my styles defined when I was playing
around with creating, and copying the styles. When I
found out it did not work I copied this outline style
again, overwritting the old one, but it was copied wrong
again.

I found and read that gotcha document yesterday already.
I always have this "Automatically update document styles"
disabled (never trusted this), so that could not be the
reason. The VBA part in that document is a bit to much
over my head...

Any more sugestions?
Thank you
John-Pierre
 
M

Margaret Aldis

Hi Jee Pee

Did you try copying three times while the Organizer was open? That seems to
work for many people. (BTW, from the wording of your original post I'm
assuming you rightly set up indent, text position and tab from the numbering
scheme, and not from the Paragraph settings of the style - if not that is
another possible source of error.)

Otherwise, avoiding VBA, you could try naming the list template. Do this
carefully from the style (not Format > Bullets and Numbering) so as not to
mess up the style linking:

From the *top level*style of each numbering scheme, Modify > Numbering.

Without changing the pane, Customize > More

Changing nothing else, add a 'LISTNUM' name for the template.

I think you may find this forces Word to import the right list template with
the style, either when you use the Organizer, or by opening Tools >
Templates and Add-ins and ticking 'Automatically Update Styles' (remembering
to turn it off again afterwards).

If none of this works you will just have to update the numbering scheme(s)
again in the document after importing all the styles, or brave VBA!
 
J

JeePee

Thank you for your reply. Unfortunately non if it works.

* I copied 3 times in the organizer (and overwrite the
existing style), but the tab + indent positions are not
copied correctly.
* I added the listnum fields: Format > Styles and
Formatting > Right click the style > Modify > Format >
Numbering > Customize (without changing a pane) > More. I
added the listnum name, applied the change and closed all
windows (except the template file to which I made the
change). I then went to Tools > Templates and Add-ins >
Organizer > Left "Automatically update document styles"
unticked > Organizer > copied the style 3 times over to
the another .dot file. Closed all and opened the
other .dot file. Tab and indent positions are different
again. Even the added listnum name is not copied over.

It was a pain to find the right tab/indent positions to
get the text always appear correct because word
automatically goes to the next tab positions if it does
not fit in what you defined. I already wrote it in a
document so I don't have to puzzle each time I need to
copy it over.

Can you advise a book that covers everything on creating
your own templates and styles? (and I don't mean a
Microsoft book that writes how it *should* be :).

Thanks again
 
B

Bruce Brown

John-Pierre

This macro should do what you want. Run it after copying sytles into
the new document.

To learn how to copy and use the macro:

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

Where it says "Heading 1" in line 4, you have to write in the name of
your outline-numbered style. Presumably, you put the number at the
end of each style like this: MyOutlineStyle 1, MyOutlineStyle 2, etc.
Where "Heading " appears at the end of each Case, change it to the
name of your heading style.

If you didn't add a number at the end of your style, simply type in
the whole style name after .LinkedStyle = "MyOutlineStyle", based on
the Case number.

Naturally, you're going to have to change the number and text
positions to the ones you want.


Sub CopyHeadingIndents()
Dim L As ListTemplate, k As Byte
For Each L In ActiveDocument.ListTemplates
If L.ListLevels(1).LinkedStyle = "Heading 1" Then
With L
For k = 1 To 4
With .ListLevels(k)
Select Case k
Case 1
.NumberPosition = InchesToPoints(0)
.TextPosition = InchesToPoints(0)
.TabPosition = InchesToPoints(0)
.LinkedStyle = "Heading " & k
Case 2
.NumberPosition = InchesToPoints(0.5)
.TextPosition = InchesToPoints(0)
.TabPosition = InchesToPoints(0)
.LinkedStyle = "Heading " & k
Case 3
.NumberPosition = InchesToPoints(1)
.TextPosition = InchesToPoints(0)
.TabPosition = InchesToPoints(0)
.LinkedStyle = "Heading " & k
Case 4
.NumberPosition = InchesToPoints(1.5)
.TextPosition = InchesToPoints(1)
.TabPosition = InchesToPoints(0)
.LinkedStyle = "Heading " & k
End Select
End With
Next
End With
Exit For
End If
Next
End Sub

You're right that you shouldn't have to bother with VBA to do this.
But that sentiment and $2.00 will get you a ride in the subway. -
Bruce
 

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