View Single Post
 
Old 02-15-2019, 11:56 AM
AntiqueWhale AntiqueWhale is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2018
Posts: 11
AntiqueWhale is on a distinguished road
Smile

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
Still little confused

I think in your code, you set the rng start point using:
ActiveDocument.Goto(What:=wdGotopage, Name:iPage)
you set the rng endpoint using
rng.Goto(What:=wdGotoBookmark, Name:="\Page")
Could you elaborate on this?

And I write VBA code in Excel to manipulate Word behavior using late bind technology, I know I can not use any word object build in constant instead of using pure numerical value. Do you have any other caveat for me? Thanks!!!!!!
Reply With Quote