The PDF Link is actually opening the template, which is why the template
is getting overwritten. If you will notice the title bar when you open
from the PDF link, it lists the name of the template itself, rather than
"document1"
What I would do, is add the following code to the template. This will
force the template to always open as a new document.
Private Sub Document_Open()
'this code is for template and prevents
'the user from accidentally opening template
'in development mode...create standard document
'turns off repagination and screen updating
'to allow automation to work faster and
'less chance of template corruption or crashing
Options.Pagination = False
Application.ScreenUpdating = False
Dim intDocumentType
Dim strTemplateName As String
Dim strTemplatePath As String
'The following allows the entire project
'to know which template is being worked with
'and it's path. This prevents from having
'to place the template in a specific
'Word template directory. Both are Globals
'gets the full path/name of the active template
strTemplateName = Templates(1).FullName
'gets Path to Template and pads with "\" if required
strTemplatePath = Templates(1).Path
If Right(strTemplatePath, 1) <> Application.PathSeparator Then
strTemplatePath = strTemplatePath & Application.PathSeparator
End If
intDocumentType = ActiveDocument.Type
'*******************************************
'COMMENT OUT ALL INDENTED CODE BELOW WHEN WORKING
'ON TEMPLATE IN DESIGN MODE OR CHANGES
'WON'T BE PROPERLY SAVED. TURN IT BACK ON
'FOR FINAL SO USER CAN'T ACCIDENTALLY
'ACCESS MASTER TEMPLATE DESIGN
'********************************************
If intDocumentType = 1 Then
Documents.Add Template:=strTemplateName
Documents(strTemplateName).Close SaveChanges:=wdDoNotSaveChanges
End If
End Sub
If you need help with installing the above code, then see
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=166 for
help with getting it installed.
--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"
This message is posted to a newsgroup. Please post replies and questions
to the newsgroup so that others can learn as well.
I created a template in Word 2003. When I open it from the folder in Windows
it forces me to save changes as a new file, which is what it is supposed to
do. But, when I open the template from a link in a PDF document and make
changes, it just overwrites the template. It does not force me to save it
under a new name as a new file.
How can I set it so that each time the template is opened from the link in
the PDF file, I have to change the file name so that the original template
remains unchanged?
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 12/28/2007 11:51 AM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date:
12/28/2007 11:51 AM