Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-13-2018, 07:01 PM
Yong Xiang Yong Xiang is offline How do I code bookmark globally for different template? Windows 7 32bit How do I code bookmark globally for different template? Office 2016
Novice
How do I code bookmark globally for different template?
 
Join Date: Dec 2018
Posts: 9
Yong Xiang is on a distinguished road
Default 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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I code bookmark globally for different template? Field Code: Show a value only if bookmark is not empty Cosmo Word 7 08-24-2018 01:46 PM
How do I code bookmark globally for different template? VBA Code to Access Building Block Template in Word 2013 Startup folder rdross51 Word VBA 2 06-01-2016 07:05 PM
Find Bookmark, move to bookmark, execute code, repeat raymm3852 Word VBA 10 04-15-2016 06:21 PM
How do I code bookmark globally for different template? VBA Code in template does not run in new document highrise955 Word VBA 4 03-06-2016 04:48 PM
How do I code bookmark globally for different template? Visual basic code for Word 2003 template KateAus Word VBA 4 09-09-2012 08:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft