VBA Code for putting a style into all documents, old and new
https://i1.social.s-msft.com/globalr...f?cver=0%0d%0a
Hi
I have a style and want it to populate all files in the past as well as the new ones. I put it into Normal.dotx and then got this code:
Sub AutoOpen()
Dim strMyStyle As String
strMyStyle = "MyNumbering"
Application.OrganizerCopy Source:=ThisDocument.FullName _
, Destination:=ActiveDocument.FullName, Name:=strMyStyle, _
Object:=wdOrganizerObjectStyles
End Sub
However, I get an error with a "command failed". I am unsure if this is the correct code to use. Any suggestions? Thanks...