D
Dodiad
I have been looking at the MVP article by Dave Rado, Margaret Aldis, Ian
Sharpe, and Beth Melton titled "How to safely update a document's styles from
its template without using the Organizer." The article mentions that in order
for all of the template's styles to be updated correctly into a document
based on it, the styles must not only appear in the "Styles in use" list in
the template's Format + Style dialog, but must also at least once have been
physically applied to text in the template. To ensure this, the article
recommends creating a dummy paragraph in the template, cycling it through all
of the styles in the "in use" list, and then deleting it.
My question is this: Is it sufficient to run a VBA macro to "touch" all of
the template's styles--something like
Sub TouchStyles()
Dim dummyParagraph as Paragraph
With ActiveDocument.Paragraphs
.Add
Set dummyParagraph = .Last
Dim eachStyle As Style
For Each eachStyle In ActiveDocument.Styles
dummyParagraph.Style = eachStyle
Next 'eachStyle
End With 'ActiveDocument.Paragraphs
End Sub 'TouchStyles
Will this do the trick, or is it necessary to apply all of the styles by
hand, using the mouse from the Styles dialog?
Sharpe, and Beth Melton titled "How to safely update a document's styles from
its template without using the Organizer." The article mentions that in order
for all of the template's styles to be updated correctly into a document
based on it, the styles must not only appear in the "Styles in use" list in
the template's Format + Style dialog, but must also at least once have been
physically applied to text in the template. To ensure this, the article
recommends creating a dummy paragraph in the template, cycling it through all
of the styles in the "in use" list, and then deleting it.
My question is this: Is it sufficient to run a VBA macro to "touch" all of
the template's styles--something like
Sub TouchStyles()
Dim dummyParagraph as Paragraph
With ActiveDocument.Paragraphs
.Add
Set dummyParagraph = .Last
Dim eachStyle As Style
For Each eachStyle In ActiveDocument.Styles
dummyParagraph.Style = eachStyle
Next 'eachStyle
End With 'ActiveDocument.Paragraphs
End Sub 'TouchStyles
Will this do the trick, or is it necessary to apply all of the styles by
hand, using the mouse from the Styles dialog?