How do I copy 1 page into a new document?

R

Richard S.

How do I select and copy a single page from my ActiveDocument to paste into a
new document?
 
J

Jean-Guy Marcil

Richard S. was telling us:
Richard S. nous racontait que :
How do I select and copy a single page from my ActiveDocument to
paste into a new document?

This would be one way of doing it:

Dim rgePage As Range
Dim rgeCurrent As Range
Dim docNew As Document

Set rgeCurrent = Selection.Range

Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=2
Set rgePage = Selection.Range
Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=3
rgePage.SetRange rgePage.Start, Selection.Range.Start

Set docNew = Documents.Add

docNew.Range.FormattedText = rgePage.FormattedText

rgeCurrent.Select
 

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