VBA error

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 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
 

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

Similar Threads

VBA Macro 0
VBA error 0

Top