![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
Where possible, you should make use of the existing features before going to code. It looks like you jumped #2 but #1 and #3 could be combined if the Cover Page you have stored includes a section break. The section break contains the page setup of the section that PRECEDES it so including the section break at the end of the Cover Page therefore includes the page setup and header/footer settings of the Cover Page.
Similarly, if you wanted to include a section break at the start of the "Back Cover" building block, it would set the page setup and header/footer settings of Section 2 - effectively merging #3 and #4 requests. I would have to ask why you don't simply include the cover and back page in the merge source document before resorting to code at all. I assume it has to get added post-processing because of your script. Adding a BuildingBlock at a particular location is straightforward but you need to know a few things about it: which template is it stored in, what is the building block's type, category and name. Code:
Dim aRng as Range Set aRng = ActiveDocument.Range(0,0) ActiveDocument.AttachedTemplate.BuildingBlockTypes(wdTypeCustomCoverPage).Categories("General").BuildingBlocks("Front Cover").Insert Where:=aRng, RichText:=True
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
rachmc | Word | 1 | 11-06-2017 12:22 AM |
Unmark Final document | mmineyev | Word | 2 | 10-01-2017 07:48 PM |
How to generate a word document with a table-script | valdavaux | Word | 1 | 09-17-2017 03:32 PM |
![]() |
Crystaldiamond | Word | 1 | 01-11-2015 04:00 PM |
Make text strikeouts visible in final document | klkyde | Word | 0 | 12-16-2014 11:59 AM |