Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-14-2017, 10:47 AM
chrscote chrscote is offline Copying and pasting pages with changes Windows 7 64bit Copying and pasting pages with changes Office 2010 64bit
Novice
Copying and pasting pages with changes
 
Join Date: Aug 2016
Posts: 12
chrscote is on a distinguished road
Exclamation Copying and pasting pages with changes

I have a document which has Track Changes turned on. I want to select any pages that have a revision made to it and copy it to a 2nd document. I would also like to, if possible, include the footer contents of the page I'm copying. The first part is giving me problems, however. Here is the code I'm using:
Code:
For Each oRevision In oDoc.Revisions


revNum = revNum + 1 'If this page hasn't already been copied (for multiple revisions on single page) If oRevision.Range.Information(wdActiveEndPageNumber) <> nLastPageNum Then 'Also check that the change is not in the header or footer If oRevision.Range.StoryType = wdMainTextStory Then MsgBox (oRevision.Range.Text) 'Add 1 to counter n = n + 1 oDoc.Activate ActiveDocument.Bookmarks("\Page").Select Selection.Copy oNewDoc.Activate Selection.EndKey wdStory Selection.InsertBreak (wdPageBreak) Selection.PasteAndFormat wdPasteDefault nLastPageNum = oRevision.Range.Information(wdActiveEndPageNumber) End If End If Next oRevision
Unfortunately, rather than select the page that contains the change in oDoc, the code selects the contents of the first page each time through the loop. I would appreciate any help I can get on this little dilemma. I'm sure that the 2nd half of my loop is OK, I just need to figure out the correct steps to be able to copy the appropriate page.

Chris
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying, Cutting and pasting Steve0513 Excel 1 07-13-2017 05:09 PM
copying and pasting text format paik1002 Excel 2 10-07-2016 02:34 AM
Copying and pasting pages with changes Prevent Copying and Pasting Jimmy Tsawo Excel 3 02-20-2014 03:54 AM
Copying and pasting pages with changes Copying and pasting from Excel Lorna B Word 1 03-20-2012 11:58 PM
Copying and pasting pages with changes Copying & Pasting to Firefox problems mso2u Word 2 04-07-2011 07:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:14 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