Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 10-24-2016, 03:43 AM
Cov_ATC Cov_ATC is offline Word VBA - "Page left Blank" between Sections to make all Sections start on even page Windows 7 64bit Word VBA - "Page left Blank" between Sections to make all Sections start on even page Office 2013
Novice
Word VBA - "Page left Blank" between Sections to make all Sections start on even page
 
Join Date: Oct 2016
Posts: 5
Cov_ATC is on a distinguished road
Default

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
Reply With Quote
 

Tags
automatic, blank page, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2010: Section Break "Next" Creates Blank Page Eri Word 11 02-09-2017 03:36 PM
Word VBA - "Page left Blank" between Sections to make all Sections start on even page start SOME sections on new page. 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
Word VBA - "Page left Blank" between Sections to make all Sections start on even page Mailing: how to make the "page number" in Word is the same as "row number" in excel w 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:19 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft