Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-21-2019, 11:52 AM
kilroy kilroy is offline Want to remove first 2 blank pages Windows 10 Want to remove first 2 blank pages Office 2016
Competent Performer
 
Join Date: Sep 2016
Location: Southern Ontario
Posts: 122
kilroy is on a distinguished road
Default

Cannot put code tag for some reason.


try this:



Sub DeleteFirstTwoPages()
Dim oSec As section
Dim i As Integer
Application.ScreenUpdating = False
For Each oSec In ActiveDocument.Sections
For i = 1 To 2
oSec.Range.Select
Selection.Collapse
ActiveDocument.Bookmarks("\page").Range.Delete 'this deletes current page
Next i
Next oSec
Application.ScreenUpdating = False
End Sub

Last edited by kilroy; 06-21-2019 at 11:53 AM. Reason: more content
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to remove first 2 blank pages Delete blank pages Dimsok Word VBA 18 11-14-2014 12:30 PM
Want to remove first 2 blank pages deleting blank pages thauser Word 3 05-27-2014 01:56 AM
Want to remove first 2 blank pages remove blank lines in between jolinchew Excel 4 08-01-2013 06:09 AM
Want to remove first 2 blank pages Deleting blank pages Microsoftenquirer1000 Word 14 08-27-2012 01:24 PM
hidden blank pages mljm Word 3 06-19-2009 03:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:29 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