Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2017, 11:14 AM
spider85 spider85 is offline Word VBA docm to dotm problem Windows 10 Word VBA docm to dotm problem Office 2016
Novice
Word VBA docm to dotm problem
 
Join Date: Apr 2017
Posts: 4
spider85 is on a distinguished road
Default Word VBA docm to dotm problem

Hi everyone,



i have problem, last days i made a VBA word file with some quicktext blocks saved in normal.dotm. everything runs great.
Now i thought i'd make it a template on is own, so i saved the whole file as "template.dotm" changed the location of the quicktext parts from normal.dotm to template.dotm, but now if i run the VBA and i want to insert a quicktext part i got the following error message:

Code:
   
Application.Templates(strTemplate). _
                        BuildingBlockEntries("Quick1").Insert _
                        Where:=orng, _
                        RichText:=True
What do i need to change? it looks like it still looks for the parts in the normal.dotm?

Kind Regards
Reply With Quote
  #2  
Old 04-16-2017, 08:42 PM
gmayor's Avatar
gmayor gmayor is offline Word VBA docm to dotm problem Windows 10 Word VBA docm to dotm problem 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

What does strTemplate point to? The following should work provided the macro and the building block are in the template

Code:
Application.Templates(ThisDocument.FullName). _
                        BuildingBlockEntries("Quick1").Insert _
                        Where:=orng, _
                        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
  #3  
Old 04-17-2017, 02:08 AM
spider85 spider85 is offline Word VBA docm to dotm problem Windows 10 Word VBA docm to dotm problem Office 2016
Novice
Word VBA docm to dotm problem
 
Join Date: Apr 2017
Posts: 4
spider85 is on a distinguished road
Default

Did the trick, tnx!!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word VBA docm to dotm problem Printing multiple copies of docm from Word to PDF saving file with sequential name- 001, 002 etc. SSCMapletart Word VBA 3 04-18-2017 03:04 AM
Word VBA docm to dotm problem DOCM file not saving on Microsoft Word 2010 flutterby1 Word 4 10-08-2014 10:55 AM
Word VBA docm to dotm problem How to convert docm to dotm without opening the file Moz Word 1 12-20-2012 04:23 PM
Word VBA docm to dotm problem Problem saving in Word 2007 a dotm Addin developed in Word 2010 RichardP Word VBA 6 04-26-2012 04:22 AM
Word VBA docm to dotm problem A newbie question: a must to save macro word file as .docm? tinfanide Word VBA 6 12-06-2011 03:02 PM

Other Forums: Access Forums

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