Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 09-07-2014, 02:37 AM
gmayor's Avatar
gmayor gmayor is offline Delete blank pages Windows 7 64bit Delete blank pages Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If they are just paragraph breaks at the end then

Code:
Sub Macro1()
Dim i As Long
    For i = ActiveDocument.Paragraphs.Count To 1 Step -1
        If Len(ActiveDocument.Paragraphs(i).Range) = 1 Then
            ActiveDocument.Paragraphs(i).Range.Delete
        Else
            Exit For
        End If
    Next i
End Sub
As for the compiler error with the previous macro, you have a missing object library reference - Microsoft Forms 2.0

If you change
Dim dFname As DataObject
to
Dim dFname As Object

it should compile.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete blank pages deleting blank pages thauser Word 3 05-27-2014 01:56 AM
Delete blank pages Deleting blank pages Microsoftenquirer1000 Word 14 08-27-2012 01:24 PM
delete blank pages from mail merge document blusea Word 0 12-17-2010 06:10 PM
How do you delete a blank page at end? aerophil Word 4 10-24-2009 05:04 AM
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 08:40 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