Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding all formatted text 1

Status
Not open for further replies.

LCJ18786

Programmer
Nov 23, 2011
9
GB
I was wondering if anybody could provide me with any sugguestions on how to solve my scenario in the most quickest and effective way. I have loads of templates that were created in Word 2003 and are now being copied over to Word 2010 to be saved as a .docx

I wrote a macro that would find text within bookmarks in document A and then copy the text into the bookmarks into document B. Once the text has been pasted into document B, it is being pasted in with no formatting which is what I want as I would like to get rid of any styles linked to it.

The problem I am having is I would have to go through each document and reapply any formatting (bold, italic, underline, bullets and numbering, keep with next, etc) that was within the bookmarks. Is there anyway in which I could find any formatted text within the bookmarks in document A and then reapply it back to the non formatted text in document B using a macro?

Any help would be very much appreciated as this could save alot of time.

Thanks

Louis
 
You would probably do better to define a set of character Styles for the formats you waqnt to preserve, use Find/Replace to update the corresponding text in the source document, then copy & paste the formatted text into the target document. This is far easier (and a better practice) than trying to synchronise the hard attribute formatting of the ranges in two documents.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top