OrganizerCopy Method Example

This example copies all the AutoText entries in the template attached to the active document to the Normal template.

For Each aEntry In ActiveDocument.AttachedTemplate.AutoTextEntries
    Application.OrganizerCopy _
        Source:=ActiveDocument.AttachedTemplate.FullName, _
        Destination:=NormalTemplate.FullName, Name:=aEntry.Name, _
        Object:=wdOrganizerObjectAutoText
Next aEntry

If the style named "SubText" exists in the active document, this example copies the style to C:\Templates\MyTemplate.dot.

For Each sty In ActiveDocument.Styles
    If sty = "SubText" Then
        Application.OrganizerCopy Source:=ActiveDocument.Name, _
            Destination:="C:\Templates\MyTemplate.dot", _
            Name:="SubText", _
            Object:=wdOrganizerObjectStyles
    End If
Next sty