• Updating old macros again

    Author
    Topic
    #1774047

    Got handed a project to update some quite complicated macros. This bit adds a new style to a file, but it doesn’t work in Word 2016 for Mac. Anyone have any ideas?

    Set charBodyReg = ActiveDocument.Styles.Add(Name:=”char_Body_Reg”, Type:=wdStyleTypeCharacter)
    With charBodyReg.Font
    .Size = 10.5
    .Size = .Parent.Font.Size
    .Name = “WilliamsCaslonText Regular”
    .Bold = False
    .Italic = False
    .Superscript = False
    .Underline = False
    .SmallCaps = False
    End With

    The error message I get is “Run-time error 5173. This style name already exists or is reserved for a built-in style name.” Tried changing the style name that’s being called, but no luck. There’s about 50 similar styles that get added.

    I appreciate any help you can give me.

    Reply To: Updating old macros again

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: