View Single Post
 
Old 03-29-2018, 07:00 PM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Try

Code:
Sub UpdateMyStyleOnOpen()
' Charles Kenyon 2018-03-22
' https://www.msofficeforums.com/word/3...tml#post126054
'
' UpdateMyStyleOnOpen Macro
' Copies named style from normal template to any document that is opened, overwriting existing style
'
' Rename as AutoOpen (instead of UpdateMyStyleOnOpen) and store in Normal.dotm template.
' Set variable strMyStyle to contain the name of style to be updated
'
'
    Dim strMyStyle As String
    strMyStyle = "Body Text"
       ' change this to be the style you want
       ' must enclose name in quotation marks
    '
    On Error Resume Next
    Application.OrganizerCopy Source:=ThisDocument.fullname _
        , Destination:=ActiveDocument.fullname, Name:=strMyStyle, _
        Object:=wdOrganizerObjectStyles
End Sub

Last edited by Charles Kenyon; 03-30-2018 at 03:43 AM.
Reply With Quote