View Single Post
 
Old 08-09-2019, 08:43 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 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

If you are running this button from a Word document, then you must already be in Word, so why create a new instance of Word? However when you create a new document using the code Set objDoc = objWord.Documents.Add this creates a document from the normal template which hopefully will not have your button. You need to create a new document from the template containing the button.

In any case you do not really need a button at all. You could use an autonew macro in the template you are creating to call the userform and that template could already have the table which is fixed in your code, so there is no need to build it.
__________________
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