View Single Post
 
Old 03-11-2020, 05:12 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You should create the basic layout as a Word template so that when you create the initial document, it already contains the standard content and formatting.

Set objDoc = .Documents.Add(sPathToTemplate)

If your template already contained all the elements your code creates then the rest of the code you showed is actually not needed. You would then use code to bring in the Excel content itself.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote