![]() |
#3
|
||||
|
||||
![]()
My question is: Why you're using all this VBA code to write boilerplate content to a document instead of using to create a document from a template that already contains all of that content?
With a template you don't need anything between: Set objDoc = objWord.Documents.Add - with a template reference and: txtword = (and even most of what's in txtword you can do without), or any of the: objRange stuff at the end of your code. Moreover, with a template, the only variables you need are: Dim objWord As Object, objDoc As Object, txtword As String
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jbengal | Word | 5 | 11-23-2022 02:17 PM |
![]() |
OkiDoki | Word | 4 | 09-30-2016 11:41 AM |
![]() |
sheaters | Word | 2 | 05-04-2016 01:57 PM |
How to create a special TOC in word document? | gn4619 | Word VBA | 5 | 04-29-2015 04:25 PM |
How to identify whether Word 2007 was used to create a document saved as Word 2003 | noviceatwork | Word | 0 | 03-08-2012 06:40 AM |