Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-28-2014, 10:35 PM
gmayor's Avatar
gmayor gmayor is offline Copy a page from a document Windows 7 64bit Copy a page from a document Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The problem is that there are no pages in a Word document. Documents are made up of several separate overlaid elements flowed into the space between the margins. The displayed page is not a fixed entity and cannot be treated as a single item. When you select and copy the page, you are only selecting the current story range. You cannot select items that are in other layers (such as the headers and footers) at the same time.

You can get around some of it by creating the new document from the old one, but anything more radical is going to be problematic.

Put your cursor in the page and run the following macro:

Code:
Sub CopyCurrentPageToNewDoc()
Dim oNewDoc As Document
Dim oRng As Range
    On Error GoTo err_handler
    ActiveDocument.Save
    Set oRng = ActiveDocument.Bookmarks("\page").Range
    Set oNewDoc = Documents.Add(Template:=ActiveDocument.FullName)
    oNewDoc.Range.FormattedText = oRng
lbl_Exit:
    Exit Sub
err_handler:
    MsgBox "The document must be saved first!"
    Resume lbl_Exit
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to copy one page to another file ketanco Publisher 1 11-20-2014 03:00 PM
Copy a page from a document Is there any way to copy an entire page? Jennifer Murphy Visio 6 05-09-2013 06:20 AM
Anyway to copy a complete page full of objects into a new document? MuffinStud Word 1 12-20-2012 04:43 AM
Copy a page from a document Find, copy and paste into a new page jperez84 Word VBA 24 09-20-2012 11:34 AM
2 page document printing problem, text from page 1 in layout of page 2 when printed laurawether45 Word 1 08-02-2012 07:03 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft