Style Changing

L

Lisa

I have been trying to do this numbering with styles
without success. It is getting so frustrating. I don't
know what to do any more. Just when I think I get it
going correctly, it screws up somehow.

1 - After you set up a template and you want to add it to
a document, do you go into "Templates and Add-ins" and
select "Attach" and select the template just made, AND
then select Organizer and close the "Normal.Dot" template
and open the template just made and then close out of
that?

Because when I do that, and I select the styles such as
Heading 1, Heading 2, Subtitle, Title, etc., the
formatting is not the same. For instance, Heading 2 does
not have the same spacing as the template. Why is that?

2 - Also, whenever I start over and think I have things
just right, I'll retrieve the document that is all set up
and the style names have changed. For instance, Title
has changed to a style called "Table Grid,"
and "Subtitle" will have changed to a style
called "Signature." Why would that happen?

I am really confused. And I have looked at
shaunakelly.com/numbering. It doesn't explain what is
going on.

IS THERE ANY WAY YOU CAN HELP? PLEASE.
 
C

Charles Kenyon

--
See: How to create numbered headings or outline numbering in your Word
document
<URL: http://www.shaunakelly.com/word/numbering/OutlineNumbering.html>. This
is based on ...

Word's Numbering Explained
<URL: http://www.mvps.org/word/FAQs/Numbering/WordsNumberingExplained.htm>

How to Create a Template, Part II
<URL: http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart2.htm>

Seven Laws of Outline Numbering
<URL: http://www.microsystems.com/fra_sevenlawsofoutlinenumbering.htm>

The following are some discussions on the Microsoft newsgroups on numbering:
Nightmare on ListNumbering Street <URL:
http://groups.google.com/groups?hl=en&lr=&safe=off&th=9e790fa7ed2886b3,18&ic=1>
The Joy of Lists <URL:
http://groups.google.com/groups?hl=en&lr=&safe=off&th=811287ebce8fc203,15&ic=1>
Relinking ListTemplates <URL:
http://groups.google.com/groups?hl=en&lr=&safe=off&th=2350746054c838e,12&ic=1>
Outline numbering: restart doesn't restart <URL:
http://groups.google.com/[email protected]#p>
Format Doesn't "Hold" <URL:
http://groups.google.com/[email protected]#p>
(above list compiled by Dave Rado, Word MVP)

ListNumbering Street Revisited <URL:
http://groups.google.com/groups?hl=en&safe=off&th=57df77857e4993ce>

See the latest numbering discussion I've seen, especially post #4 which
contains Dave Rado's concise instructions for setting up heading numbering.
<URL:
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=bce07d7714769f5c>

--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
S

Suzanne S. Barnhill

Attaching a template with "Automatically update document styles" should get
you a good bit of the way, but you might have more success creating a new
document based on the template and using Insert | File to insert the
existing document.
 
B

Bruce Brown

Lisa -

Happen to have been working on the same problem recently. This code
copies the Heading styles from the template to the new doc without
touching any of the other styles. You store it in the template and
run it with both docs open.

Open up the new document and create a bookmark called "NewDoc"
anywhere in the doc.

Then open up the template and run this macro from it.

Note: in both the template and the new doc, the built-in Heading
styles *must be already linked* to a list template or it won't work.

Just to spite the two of us it may not work anyway! But cross your
fingers - when it works, it does a nice job. Please let us know if you
had any luck with it. - Bruce

Sub CopyHeadingStyles()
Application.ScreenUpdating = False
Dim TemplateLT As ListTemplate
Dim NewLT As ListTemplate
Dim L As ListTemplate

Dim Sty As Style
Dim TemplateSty() As Style
Dim NewSty() As Style

Dim TemplateDoc As Document
Dim NewDoc As Document
Dim W As Window

Set TemplateDoc = ActiveDocument
For Each W In ActiveDocument.Windows
If W.Document.Bookmarks.Exists("NewDoc") Then
Set NewDoc = W.Document
Exit For
End If
Next

For Each L In TemplateDoc.ListTemplates
If L.ListLevels(1).LinkedStyle = "Heading 1" Then Exit For
Next
Set TemplateLT = L

For Each L In NewDoc.ListTemplates
If L.ListLevels(1).LinkedStyle = "Heading 1" Then Exit For
Next
Set NewLT = L

Dim k As Byte
For k = 1 To 9
With NewLT.ListLevels(k)
.Font.Bold = TemplateLT.ListLevels(k).Font.Bold
.Font.Italic = TemplateLT.ListLevels(k).Font.Italic
.Font.Underline = TemplateLT.ListLevels(k).Font.Underline
.Font.AllCaps = TemplateLT.ListLevels(k).Font.AllCaps
.NumberFormat = TemplateLT.ListLevels(k).NumberFormat
.NumberPosition = TemplateLT.ListLevels(k).NumberPosition
.TextPosition = TemplateLT.ListLevels(k).TextPosition
.NumberStyle = TemplateLT.ListLevels(k).NumberStyle
.TabPosition = TemplateLT.ListLevels(k).TabPosition
.TrailingCharacter =
TemplateLT.ListLevels(k).TrailingCharacter
.LinkedStyle = NewDoc.Styles("Heading " & k)
End With
Next

ReDim TemplateSty(9) As Style
ReDim NewSty(9) As Style
Set Sty = Selection.Style

For k = 1 To 9
Set NewSty(k) = NewDoc.Styles("Heading " & k)
Set TemplateSty(k) = TemplateDoc.Styles("Heading " & k)
With NewSty(k)
.Font.Bold = TemplateSty(k).Font.Bold
.Font.Italic = TemplateSty(k).Font.Italic
.Font.AllCaps = TemplateSty(k).Font.AllCaps
.Font.Underline = TemplateSty(k).Font.Underline
.ParagraphFormat.Alignment =
TemplateSty(k).ParagraphFormat.Alignment
.ParagraphFormat.KeepWithNext =
TemplateSty(k).ParagraphFormat.KeepWithNext
.ParagraphFormat.SpaceBefore =
TemplateSty(k).ParagraphFormat.SpaceBefore
.ParagraphFormat.SpaceAfter =
TemplateSty(k).ParagraphFormat.SpaceAfter
Selection.Style = NewSty(k)
End With
Next
Selection.Style = Sty

End Sub
 

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