Very simple Range question - beggining the range on 3rd page onwards 
Author Message
 Very simple Range question - beggining the range on 3rd page onwards

I am still trying to understand how to manipulate Ranges in Word. Maybe you
can help me with this.

How would I start a Range beginning on the 3rd page of a document all the
way to the End?

thanks



Tue, 05 Apr 2005 05:00:26 GMT  
 Very simple Range question - beggining the range on 3rd page onwards
Hi Santiago,

It *sounds* simple, but since there's no page object in Word, it isn't
entirely straightforward:

Dim r0 As Range, r1 As Range
With ActiveDocument
    Set r0 = .Range
    Set r0 = r0.GoTo(What:=wdGoToPage, Name:="3")
    Set r0 = r0.GoTo(What:=wdGoToBookmark, Name:="\page")
    Set r1 = .Range(Start:=r0.Start, End:=.Range.End)
End With


Word MVP FAQ: http://www.mvps.org/word  
Reply ONLY to the newsgroup.  Note: MVPs do not work for Microsoft.
Userform demystification: http://www.speakeasy.org/~mtangard/userforms.html
"Life is nothing if you're not obsessed."  --John Waters

Quote:

> I am still trying to understand how to manipulate Ranges in Word. Maybe you
> can help me with this.

> How would I start a Range beginning on the 3rd page of a document all the
> way to the End?

> thanks



Tue, 05 Apr 2005 05:39:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need a simple macro to make page number ranges

2. Print Page Range Question

3. Another question about range objects... inserting page break

4. How do I select a constant time range from a variable time range using VBA

5. Need to Redefine Range to include Additional Ranges

6. VBA EXCEL97: How to get the range from a chart into a range object

7. Crystal Reports 8.5 date range parameter field - record selection that includes null date range

8. How can I set a Range from Page X to Page Y

9. SendObject - controlling the range of pages in the report

10. Printing Specific or Range of Pages

11. How to initialize Range with current Page

12. How to initialize Range object with Current page

 

 
Powered by phpBB® Forum Software