View Single Post
 
Old 06-29-2012, 07:44 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
That's about it, though you don't need to use Selection:
Code:
Dim Rng As Range, iPage As Long
iPage = 2
With ActiveDocument
  Set Rng = .GoTo(What:=wdGoToPage, Name:=iPage)
  Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")
  Rng.Delete
End With
A nifty one.
Yes, I didn't wanna use Selection all the time and that was why I was asking.
I've thought of using Range.GoTo, but just didn't know to use wdGoToBookmark. Thanks for your example, always.
Reply With Quote