![]() |
|
|
Thread Tools | Display Modes |
#9
|
|||
|
|||
![]()
Hi Macropod
I tried what you asked, manually adding a field, but it says "Error! Unknown op code for conditional." when updating the field. Im sorry to ask again, but I really need a code to add-in a field. The reason being is that the Doc is constantly being reviewed and amended, with paragraphs and sections removed or added. I need the editors to be able to, when adding a new Section, press a customised button on the Word ribbon, which will add a Section Break where the cursor is on the document and also automatically, just before the section break, add in the field code. So they don't have to go over the whole document and do it themselves (as they have only basic Word knowledge) Could you help me please? I have tried this but with no avail, Code:
Sub AddNextPageSectionBreakWithFieldCode() Selection.Fields.Add Selection.Range, wdFieldType.wdFieldIf, "{=MOD({PAGE},2)}= 1, {QUOTE 12} This page intentionally left blank", False With Selection 'Adds a new line .TypeParagraph 'puts a Next Page SectionBreak .InsertBreak Type:=wdSectionBreakNextPage End With End Sub |
Tags |
automatic, blank page, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2010: Section Break "Next" Creates Blank Page | Eri | Word | 11 | 02-09-2017 03:36 PM |
![]() |
drew345 | Word | 4 | 12-10-2015 08:34 PM |
"Temporary" files that show up on the left of page | livemusic | Word | 4 | 05-28-2015 04:10 PM |
![]() |
Jamal NUMAN | Word | 1 | 09-03-2011 11:37 AM |
Pesky "Sections Breaks" in word doc | Scarlet | Word | 0 | 02-09-2011 01:46 PM |