
How can I set a Range from Page X to Page Y
Hi Bobby
Dim StartRange As Range, EndRange As Range
Set StartRange = ActiveDocument.Range
Set StartRange = StartRange.GoTo(What:=wdGoToPage, Name:="2")
Set EndRange = ActiveDocument.Range
Set EndRange = EndRange.GoTo(What:=wdGoToPage, Name:="8")
EndRange.Move unit:=wdCharacter, Count:=-1
EndRange.Start = StartRange.Start
Regards
Dave
|
| I am trying to use vba to set a range from Page X to Page Y. X and Y can
be
| any number. I would like to say set a Range that includes Page 2 to 7. I
| need to Delete this range or apply changes that apply only to that Range
in
| the document.
|
| Any ideas on how to do this would be appreciated.
|
|
|
|