Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2011, 09:38 AM
zsmithku zsmithku is offline Need help extracting specific text from one doument to another with macro/VBA. Windows XP Need help extracting specific text from one doument to another with macro/VBA. Office 2007
Novice
Need help extracting specific text from one doument to another with macro/VBA.
 
Join Date: Apr 2011
Posts: 1
zsmithku is on a distinguished road
Default Need help extracting specific text from one doument to another with macro/VBA.

I am currently trying to automate some of my processes at work to become more efficient.
Every week I make a report to send to my supervisor in Word. I would like to run a macro that at the end when the report is finished I can run a macro that copies particular sections of my report and copies them into a new "template" document that I send to a different supervisor. (And maybe even link that process to Microsoft Outlook to attach the files and insert appropriate text.)
I have tried the Record Macro feature and I just can't get anything going. I would love to take the time to really learn VBA, but that doesn't seem like any easy task.



Any information would be helpful. Thank you.
Reply With Quote
  #2  
Old 04-15-2011, 03:46 PM
macropod's Avatar
macropod macropod is offline Need help extracting specific text from one doument to another with macro/VBA. Windows 7 32bit Need help extracting specific text from one doument to another with macro/VBA. Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Hi zsmithku,

The easiest way is to simply delete the unwanted material and save what's left to a new file. before you can even do that, though, Word would need a reliable means of identifying what parts to keep/delete. One way this could be done is via Section breaks, so that you could tell Word to delete, say, Sections 3-5,7 & 9. Of course, if this is going to be hard-coded, you would have to ensure that the document always had the same Section structure.

As an alternative, you could simply bookmark the portions you want replicated (each portion needs a different bookmark) and, in another document, use INCLUDETEXT fields pointing to those bookmarks. If you do that, changes in the 'source' document automatically update in the 'target' document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help extracting specific text from one doument to another with macro/VBA. Need help on Macro 03- Find text - if text is blank then remove line simpleonline1234 Word VBA 1 02-25-2011 02:28 AM
Need help extracting specific text from one doument to another with macro/VBA. Selecting specific text out of a series of columns speedycorn1 Word 3 11-01-2010 02:58 PM
Need help extracting specific text from one doument to another with macro/VBA. extracting data from Table to text file Anirudh_Dsp Word Tables 1 05-23-2010 07:48 AM
Need help extracting specific text from one doument to another with macro/VBA. Strip lf/cr from text p3aul Word 9 08-18-2009 12:42 AM
Need help extracting specific text from one doument to another with macro/VBA. Extracting Cell color bsaucer Excel 1 06-19-2009 06:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:26 AM.


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