OrganizerDelete Method Example

This example deletes the toolbar named "Custom 1" from the Normal template.

For Each cb In CommandBars
    If cb.Name = "Custom 1" Then 
        Application.OrganizerDelete Source:=NormalTemplate.Name, _
            Name:="Custom 1", Object:=wdOrganizerObjectCommandBars
    End If
Next cb

This example prompts the user to delete each AutoText entry in the template attached to the active document. If the user clicks the Yes button, the AutoText entries are deleted.

For Each entry In ActiveDocument.AttachedTemplate.AutoTextEntries
    response = MsgBox("Do you want to delete the " & entry.Name _
        & " AutoText entry?", vbYesNoCancel)
    If response = vbYes Then
        With ActiveDocument.AttachedTemplate
            Application.OrganizerDelete _
                Source:= .Path & "\" & .Name, _
                Name:=entry.Name, _
                Object:=wdOrganizerObjectAutoText
        End With
    ElseIf response = vbCancel Then
        Exit For
    End If
Next entry