J
jgugenheim
Hi
I have some strange style copying behaviour in Word 2003 under XP here. I
have a template.dot file with example text set up in all our corporate
styles. We refresh our book chapters with this just before publishing. If we
refrefresh using the same font as the book already contains, all is well. If
we change the font (only the font name, nothing else) of a style in the
template.dot file just before the refresh then about a quarter of the
paragraphs (always the same ones) are changed to condensed by 1.0 points.
Here is the core of the refresh macro (I have removed a couple of very long
paths):
'==================================================
' Count the styles avilable in Template.dot and create a list of their
names
Documents.Open FileName:="C:\....\Template.dot"
Set myDoc = ActiveDocument
StyleCount = 0
For Each sty In myDoc.Styles
StyleCount = StyleCount + 1
StyleNames(StyleCount) = sty.NameLocal
Next sty
Documents("Template.dot").Close
' ActiveDoc is now the book chapter again
For n = 1 To StyleCount
Application.OrganizerCopy _
Source:="C:\....\Template.dot" _
, Destination:=ActiveDocument.Path & "\" & ActiveDocument.Name _
, Name:=StyleNames(n) _
, Object:=wdOrganizerObjectStyles
Next n
'==================================================
If anyone has any idea what I may be doing to cause this condensing I'd be
really grateful!
Jeremy
I have some strange style copying behaviour in Word 2003 under XP here. I
have a template.dot file with example text set up in all our corporate
styles. We refresh our book chapters with this just before publishing. If we
refrefresh using the same font as the book already contains, all is well. If
we change the font (only the font name, nothing else) of a style in the
template.dot file just before the refresh then about a quarter of the
paragraphs (always the same ones) are changed to condensed by 1.0 points.
Here is the core of the refresh macro (I have removed a couple of very long
paths):
'==================================================
' Count the styles avilable in Template.dot and create a list of their
names
Documents.Open FileName:="C:\....\Template.dot"
Set myDoc = ActiveDocument
StyleCount = 0
For Each sty In myDoc.Styles
StyleCount = StyleCount + 1
StyleNames(StyleCount) = sty.NameLocal
Next sty
Documents("Template.dot").Close
' ActiveDoc is now the book chapter again
For n = 1 To StyleCount
Application.OrganizerCopy _
Source:="C:\....\Template.dot" _
, Destination:=ActiveDocument.Path & "\" & ActiveDocument.Name _
, Name:=StyleNames(n) _
, Object:=wdOrganizerObjectStyles
Next n
'==================================================
If anyone has any idea what I may be doing to cause this condensing I'd be
really grateful!
Jeremy