![]() |
#3
|
||||
|
||||
![]()
You should be able to do it with something like:
Code:
Sub DeletePages() Application.ScreenUpdating = False Dim p As Long, Rng As Range With ActiveDocument For p = .ComputeStatistics(wdStatisticPages) To 1 Step -1 Set Rng = .Range.GoTo(What:=wdGoToPage, Count:=p).GoTo(What:=wdGoToBookmark, Name:="\Page") If Rng.HighlightColorIndex = wdNoHighlight Then Rng.Delete Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Jonfrank1@me.com | Project | 1 | 01-09-2017 06:04 PM |
![]() |
AustinBrister | Word VBA | 8 | 05-28-2015 02:42 PM |
![]() |
sential | Word | 6 | 01-10-2014 03:22 PM |
Delete button does not work with highlighted text | edmund36 | Word | 3 | 10-17-2011 02:34 AM |
Highlighted text won't delete - when I press enter | Gague | Word | 2 | 07-09-2010 12:53 PM |