P
polska2180
Private Sub CommandButton1_Click()
ActiveDocument.Unprotect
WordBasic.MailMergeFindEntry
Application.ScreenUpdating = False
Windows("SERVICE AGREEMENT (Read-Only)").Activate
Selection.WholeStory
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
Selection.TypeBackspace
ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
wdAllowOnlyFormFields
Windows("SERVICE AGREEMENT (Read-Only)").Activate
ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
wdAllowOnlyFormFields
End Sub
Okay, here is my script. As you can see after a new document i
created the origingal merged document (read-only) is selected t
protect it. Now my problem is that although i want "Servic
Agreements" protected I want the new document to be showing. Wha
would be the script that would allow me to leave the new documen
active but still protect 'service agreement'
NOTE: Making the new document active after the at the end would no
work as there can be several new documents created ie 'document 1'
'document 2' etc. I want the most recent document to be active.
Thanks
ActiveDocument.Unprotect
WordBasic.MailMergeFindEntry
Application.ScreenUpdating = False
Windows("SERVICE AGREEMENT (Read-Only)").Activate
Selection.WholeStory
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
Selection.TypeBackspace
ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
wdAllowOnlyFormFields
Windows("SERVICE AGREEMENT (Read-Only)").Activate
ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
wdAllowOnlyFormFields
End Sub
Okay, here is my script. As you can see after a new document i
created the origingal merged document (read-only) is selected t
protect it. Now my problem is that although i want "Servic
Agreements" protected I want the new document to be showing. Wha
would be the script that would allow me to leave the new documen
active but still protect 'service agreement'
NOTE: Making the new document active after the at the end would no
work as there can be several new documents created ie 'document 1'
'document 2' etc. I want the most recent document to be active.
Thanks