T
toolmaker
Is there a way to use a macro to copy the Document_New event from 1
template's ThisDocument object to another's?
I would like to add the following, PARTICULARLY the CustomizationContext, to
the new Template's ThisDocument object:
---------------------------------------
Private Sub Document_New()
On Error GoTo bye
CustomizationContext = ActiveDocument.AttachedTemplate
If Application.Version >= "11.0" Then
CommandBars("Task Pane").Visible = False
End If
bye:
End Sub
----------------------------------------
PS: I do know how to copy a module and a toolbar. After setting variables
to specific templates, I do it like this:
---------------------------------------
Application.OrganizerCopy Source:=nodTemplate, _
Destination:=stTemplate, _
Name:="NODmacros", Object:=wdOrganizerObjectProjectItems
Application.OrganizerCopy Source:=nodTemplate, _
Destination:=stTemplate, _
Name:="NOD_Mailer_Macros", Object:=wdOrganizerObjectCommandBars
template's ThisDocument object to another's?
I would like to add the following, PARTICULARLY the CustomizationContext, to
the new Template's ThisDocument object:
---------------------------------------
Private Sub Document_New()
On Error GoTo bye
CustomizationContext = ActiveDocument.AttachedTemplate
If Application.Version >= "11.0" Then
CommandBars("Task Pane").Visible = False
End If
bye:
End Sub
----------------------------------------
PS: I do know how to copy a module and a toolbar. After setting variables
to specific templates, I do it like this:
---------------------------------------
Application.OrganizerCopy Source:=nodTemplate, _
Destination:=stTemplate, _
Name:="NODmacros", Object:=wdOrganizerObjectProjectItems
Application.OrganizerCopy Source:=nodTemplate, _
Destination:=stTemplate, _
Name:="NOD_Mailer_Macros", Object:=wdOrganizerObjectCommandBars