fionabolt
11-26-2009, 07:37 AM
Hi there,
I'm trying to copy styles from a .dot Addin to an open document. However the following code falls over at the Application.OrganizerCopy line with the err 4149, File not Found.
Anyone out there got a better solution for copying styles from an Addin?
Thanks
Fiona
Sub blah()
Dim ad As AddIn
Dim addinTmp As String
For Each ad In AddIns
If ad.Name = ADDINNAME Then
addinTmp = ad.Path & Application.PathSeparator & ad.Name
End If
Next ad
Application.OrganizerCopy addinTmp, ActiveDocument, "Body Text", wdOrganizerObjectStyles
End Sub
I'm trying to copy styles from a .dot Addin to an open document. However the following code falls over at the Application.OrganizerCopy line with the err 4149, File not Found.
Anyone out there got a better solution for copying styles from an Addin?
Thanks
Fiona
Sub blah()
Dim ad As AddIn
Dim addinTmp As String
For Each ad In AddIns
If ad.Name = ADDINNAME Then
addinTmp = ad.Path & Application.PathSeparator & ad.Name
End If
Next ad
Application.OrganizerCopy addinTmp, ActiveDocument, "Body Text", wdOrganizerObjectStyles
End Sub