Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
EdYoung111
 
Posts: n/a
Default Hyperlink to bring up a template form

I am trying to have a log which has a hyperlink to a template form so you
can get a ID number and then get a blank form (from the template) and enter
the number.

I set up the hyperlink but it brings up the original document, not the blank
form which I need.

Thanks for your help.

Ed

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Dawn Crosier
 
Posts: n/a
Default Hyperlink to bring up a template form

I would modify your template so that it automatically opened as a new
document by adding the following code to it:

'*****Code Start*******************************

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



'*************Code
End*********************************************** ***



If you need help in adding this code to your template, see
http://www.gmayor.com/installing_macro.htm making sure that the Macros
In has the name of your template listed.


--
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.

"EdYoung111" wrote in message
...
I am trying to have a log which has a hyperlink to a template form so
you
can get a ID number and then get a blank form (from the template)
and enter
the number.

I set up the hyperlink but it brings up the original document, not
the blank
form which I need.

Thanks for your help.

Ed



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global/Master Template [email protected] New Users 1 October 27th 05 03:34 PM
text form field in document (based on template) Dan Microsoft Word Help 2 October 19th 05 05:07 PM
update text form field on document based on template Dan Microsoft Word Help 0 October 18th 05 09:09 PM
Can I create a new document with a hyperlink using template? bkrimminger Microsoft Word Help 1 October 8th 05 06:41 AM
Protected Form - allow users to access hyperlink in the form Diddakoi Microsoft Word Help 1 August 5th 05 12:34 AM


All times are GMT +1. The time now is 03:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"