Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-27-2012, 07:30 PM
macropod's Avatar
macropod macropod is offline VBA code to extract specific bookmarks from multiple word files Windows 7 64bit VBA code to extract specific bookmarks from multiple word files Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 Rattykins,

There are numerous ways the formatting could be done.

The code I posted simply gathers up all the data, looping through all the source documents to do so, and only once that's done does it output the results to the active document. It would be just as feasible to output the results as each source file is processed - either on a whole-of-file basis or on a per item (filename/bookmark, etc) basis. This gives a great deal of flexibility for formatting considerations - the method to be employed all depends on a combination of what you're comfortable with and what the required end result is.

For example, suppose you wanted all the filenames in bold. One way would be to output those as the loop progresses, apply the bold attribute, then output the bookmark data without the bold attribute. Another would be to output all the data as is now done, convert it to a table, bold whatever's in the first column, then convert the table back to text again. Just as effective, and possibly faster. Yet another would be update the output document at the end of each file's processing, then bold whatever appears on the new line up to the first tab. As you can see, with just this one example, there's at least three ways of handling the 'problem'. Any/all of these could be handled by adding code to the existing macro or by building a separate macro that the existing one calls.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to extract specific bookmarks from multiple word files how to extract wav files from ppts t-4-2 PowerPoint 2 01-19-2012 02:24 AM
VBA code to extract specific bookmarks from multiple word files how to transfer multiple excel cells into specific place in word document by formulas anton Excel 1 12-20-2011 03:56 AM
Extract Numbers from Zip Code Karen615 Excel 3 09-21-2011 06:54 AM
VBA code to extract specific bookmarks from multiple word files convert multiple csv files to multiple excel files mit Excel 1 06-14-2011 10:15 AM
Links between files to bookmarks in PDF spud098 Word 0 07-14-2010 01:11 AM

Other Forums: Access Forums

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