Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-31-2016, 03:50 AM
gmayor's Avatar
gmayor gmayor is offline VBA Code to Access Building Block Template in Word 2013 Startup folder Windows 10 VBA Code to Access Building Block Template in Word 2013 Startup folder Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

That is fairly straightforward e.g.
Code:
Dim strPath As String
    'strPath = Environ("AppData") & "\Microsoft\Word\STARTUP\BBTechTemplate.dotx"
    'or to account for users who may have moved the startup folder
    strPath = Application.Options.DefaultFilePath(wdStartupPath) & "\BBTechTemplate.dotx"

    Application.Templates(strPath).BuildingBlockEntries("Ops Tech").Insert _
            Where:=Selection.Range, _
            RichText:=True
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Word - Building Block (AutoText) - Array - Replace Text with Specific Building Blocks jc491 Word VBA 7 01-03-2016 10:34 PM
A yes or no OptionButton in Userform inserts a building block HighSierra Word VBA 3 06-14-2015 11:19 PM
VBA Code to Access Building Block Template in Word 2013 Startup folder How to share building block macros? rdross51 Word VBA 7 03-12-2015 08:59 AM
VBA Code to Access Building Block Template in Word 2013 Startup folder Custom Building Block File Locations ptmuldoon Word 5 01-03-2015 08:45 AM
Building blocks show correctly in dropdown, but wrong building block populates in doc wordgirl123 Word 0 10-03-2013 08:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:32 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