Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2012, 01:53 PM
macropod's Avatar
macropod macropod is offline Macro to insert new page... Windows 7 64bit Macro to insert new page... Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


Hi Samantha,

OK, maybe trying to build the logic into the documents themselves isn't going to work. Here's a macro you can try instead. Add it to Word's 'Normal' template and it'll be available to run on any document.
Code:
Sub Mod4Pages()
With ActiveDocument
  While .Range.ComputeStatistics(wdStatisticPages) Mod 4 <> 0
    .Range.InsertAfter Chr(12)
  Wend
End With
End Sub
Now, once your document has been generated, simply run the macro against it and however many page breaks are required will be inserted to bring the total up to a multiple of 4.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Insert Text Into Cells Having Multiple Lines revans611 Excel Programming 4 10-24-2011 10:15 AM
VBA: Recording a macro to insert a PIVOT table e093223 Excel Programming 0 10-09-2011 01:55 AM
Powerpoint Macro To Insert Objects Sample lahuva PowerPoint 0 07-06-2011 10:51 AM
Insert Page Error nmbrown Word 1 10-28-2010 10:33 AM
Macro to insert new page... Macro for Picture Insert rfhall50 Word VBA 2 10-25-2010 12:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:17 PM.


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