Copy current page + next two pages

S

Simon

Hi,



I'm wanting to select and copy the current page + next 2 pages to a new
document.



I use the following code to copy a page, but can "\page" be modified to
"\page +2"????




Code is....



Sub CopyPage()

'Select and copy the text to the clipboard

ActiveDocument.Bookmarks("\page").Range.Copy

' Open new document to paste the content of the clipboard into

Documents.Add

Selection.Paste

End Sub



Thanks

Simon
 
H

Helmut Weber

Hi Simon,

like this:

Dim p1 As Long
Dim p2 As Long
p1 = Selection.Bookmarks("\page").Range.Start
Selection.GoTo what:=wdGoToPage, which:=wdGoToNext, Count:=2
p2 = Selection.Bookmarks("\page").Range.End
Selection.SetRange Start:=p1, End:=p2
' copy or whatever
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top