W
Word2003Help
Hi,
I have VB application which uses a Word2000 custom Template and it contains
macro and the following code in the Document_Close().., Recently i migrated
to Word2003 after that the application is not working as expected..It opens
the word document and stucks and no mouse selection allows, and force to quit
the word.
ANy suggestion please..
For Each objSourceStyle In objStyles
Set objTargetStyle = objTargetDoc.Styles(objSourceStyle.NameLocal)
If objTargetStyle Is Nothing Then
Set objTargetStyle =
objTargetDoc.Styles.Add(objSourceStyle.NameLocal, objSourceStyle.Type)
End If
'copy style properties
On Error Resume Next
objTargetStyle.Font = objSourceStyle.Font
objTargetStyle.ParagraphFormat = objSourceStyle.ParagraphFormat
objTargetStyle.BaseStyle = objSourceStyle.BaseStyle
objTargetStyle.Borders = objSourceStyle.Borders
objTargetStyle.Shading = objSourceStyle.Shading
objTargetStyle.Frame = objSourceStyle.Frame
objTargetStyle.NextParagraphStyle = objSourceStyle.NextParagraphStyle
objTargetStyle.ListTemplate = objSourceStyle.ListTemplate
Next objSourceStyle
I have VB application which uses a Word2000 custom Template and it contains
macro and the following code in the Document_Close().., Recently i migrated
to Word2003 after that the application is not working as expected..It opens
the word document and stucks and no mouse selection allows, and force to quit
the word.
ANy suggestion please..
For Each objSourceStyle In objStyles
Set objTargetStyle = objTargetDoc.Styles(objSourceStyle.NameLocal)
If objTargetStyle Is Nothing Then
Set objTargetStyle =
objTargetDoc.Styles.Add(objSourceStyle.NameLocal, objSourceStyle.Type)
End If
'copy style properties
On Error Resume Next
objTargetStyle.Font = objSourceStyle.Font
objTargetStyle.ParagraphFormat = objSourceStyle.ParagraphFormat
objTargetStyle.BaseStyle = objSourceStyle.BaseStyle
objTargetStyle.Borders = objSourceStyle.Borders
objTargetStyle.Shading = objSourceStyle.Shading
objTargetStyle.Frame = objSourceStyle.Frame
objTargetStyle.NextParagraphStyle = objSourceStyle.NextParagraphStyle
objTargetStyle.ListTemplate = objSourceStyle.ListTemplate
Next objSourceStyle