
12-13-2018, 07:01 PM
|
Novice
|
|
Join Date: Dec 2018
Posts: 9
|
|
How do I code bookmark globally for different template?
Hello, I'm having trouble referencing from a different template.
What I encounter is I need to open a bookmarked template and the rest of other
the template will reference from the main bookmarked. If not error will appear as there isn't any place to refer to.
My coding is okay but is there a way to globally bookmark so that whatever another template I throw in will automatically reference from it?
PHP Code:
My Code : Sub Coding() ' 'Coding Macro
End Sub
Sub Add_HT_PD()
' Ensure style normal paragraph spacing is set to 0 before 0 after and single spacing ' Location of the template is at the desktop ' Copying QPM HT PD
ChangeFileOpenDirectory "C:\Users\YongX\Desktop" Selection.InsertFile FileName:="HT PD.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False End Sub
Sub Add_HT_US() ' ' Copying HT US
ChangeFileOpenDirectory "C:\Users\YongX\Desktop" Selection.InsertFile FileName:="HT US.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False End Sub
Sub Add_TF_PD() ' ' Copying TF PD
ChangeFileOpenDirectory "C:\Users\YongX\Desktop" Selection.InsertFile FileName:="TF PD.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False End Sub
Sub Add_TF_US() ' ' Copying TF US
ChangeFileOpenDirectory "C:\Users\YongX\Desktop" Selection.InsertFile FileName:="TF US.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False Selection.TypeBackspace End Sub
Sub Add_HT() ' ' Copying TF US
ChangeFileOpenDirectory "C:\Users\YongX\Desktop" Selection.InsertFile FileName:="HT.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False Selection.TypeBackspace End Sub
Sub Add_LT() ' ' Copying TF US
ChangeFileOpenDirectory "C:\Users\YongX\Desktop" Selection.InsertFile FileName:="LT.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False Selection.TypeBackspace End Sub
Sub Update_Fields()
Application.ScreenUpdating = False ActiveDocument.PrintPreview ActiveDocument.ClosePrintPreview Application.ScreenUpdating = True
End Sub
Last edited by Yong Xiang; 12-13-2018 at 07:06 PM.
Reason: Not to reveal Personal information
|