Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2012, 09:52 AM
jperez84 jperez84 is offline Find, copy and paste into a new page Windows XP Find, copy and paste into a new page Office 2007
Novice
Find, copy and paste into a new page
 
Join Date: Sep 2012
Posts: 21
jperez84 is on a distinguished road
Default

Thanks for the response. I have a couple of questions. First, do I type all of the words or phrase at once into the dialog box separated by commas? Second, I don't see the below code from my post:



Code:
With Rng
        .MoveStartUntil Cset:="^^^^^", Count:=wdBackward
        .MoveEndUntil Cset:="^^^^^", Count:=wdForward
        .Select
         .Copy
          With Doc
            .Range.InsertAfter "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
so it doesn't know what lines to copy.
Reply With Quote
  #2  
Old 09-12-2012, 10:52 AM
jperez84 jperez84 is offline Find, copy and paste into a new page Windows XP Find, copy and paste into a new page Office 2007
Novice
Find, copy and paste into a new page
 
Join Date: Sep 2012
Posts: 21
jperez84 is on a distinguished road
Default

Ok, I was able to modify the code so that it knows what lines to copy to and insert the ^^^^ separator. Only part I'm stuck with is how to enter the different phrases to look for.

Thanks,
Reply With Quote
  #3  
Old 09-12-2012, 04:07 PM
macropod's Avatar
macropod macropod is offline Find, copy and paste into a new page Windows 7 64bit Find, copy and paste into a new page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,536
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by jperez84 View Post
Ok, I was able to modify the code so that it knows what lines to copy to and insert the ^^^^ separator. Only part I'm stuck with is how to enter the different phrases to look for.
The code uses an inputbox to solicit the word or phrase to look for.

Were you wanting to look for multiple words/phrases at a time? I so, should all the matches be output to the same document, or to a different document for each word/prhase?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 09-12-2012, 04:00 PM
macropod's Avatar
macropod macropod is offline Find, copy and paste into a new page Windows 7 64bit Find, copy and paste into a new page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,536
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by jperez84 View Post
Thanks for the response. I have a couple of questions. First, do I type all of the words or phrase at once into the dialog box separated by commas? Second, I don't see the below code from my post:

Code:
With Rng
        .MoveStartUntil Cset:="^^^^^", Count:=wdBackward
        .MoveEndUntil Cset:="^^^^^", Count:=wdForward
        .Select
         .Copy
          With Doc
            .Range.InsertAfter "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
so it doesn't know what lines to copy.
The Find code I used looks for blocks of text other than the caret symbols, starting with a caret caret symbol, but then exludes that caret symbol from the range under consideration. Thus, each 'found' block is still delineated by them. As coded, the macro also checks whether is before the first caret symbol and after the last. And, since my macro inserts the page breaks you were after, I didn't think you needed the long string of caret symbols as well - they're easily added, though.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find, copy and paste into a new page copy and paste not working Ellie Word 3 11-07-2013 02:23 PM
Can't copy paste irenasobolewska Office 2 10-26-2012 05:09 PM
Find, copy and paste into a new page special copy/paste iconofsin Excel 1 09-15-2010 12:10 AM
Copy - Paste between 2 tables rod147 Excel 1 10-22-2009 08:21 PM
Copy & paste low resolution worriedme Drawing and Graphics 0 06-01-2009 03:05 AM

Other Forums: Access Forums

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


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