Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2013, 09:02 AM
livemusic livemusic is offline Replacing text string within document, it's not retaining formatting Windows 7 64bit Replacing text string within document, it's not retaining formatting Office 2007
Novice
Replacing text string within document, it's not retaining formatting
 
Join Date: Mar 2012
Posts: 19
livemusic is on a distinguished road
Default Replacing text string within document, it's not retaining formatting

I am doing a Replace, where I want to, say, replace the letters "Bm" within the brackets as it is in my doc, as shown below... replace the "Bm" with "Am.". Note that all (including) the brackets are in superscript format versus the surrounding words (although, it doesn't show it as superscript when I paste in this post) and the letters within the brackets are colored red. When I do a 'replace,' it does it as expected except it does not retain the red color. By default, Word should retain formatting, so, what gives?



blah {Bm}blah

Last edited by livemusic; 02-22-2013 at 01:58 PM.
Reply With Quote
  #2  
Old 02-24-2013, 11:05 AM
dougmadden@rogers.com dougmadden@rogers.com is offline Replacing text string within document, it's not retaining formatting Windows 7 64bit Replacing text string within document, it's not retaining formatting Office 2007
Novice
 
Join Date: Feb 2013
Posts: 4
dougmadden@rogers.com is on a distinguished road
Default

When you click the replace box you must go to the bottom left corner and click "more" and then "format" then "font" and adjust the color etc. The basic replace command utilizes a standard format when doing a replace and it has nothing to do necessarily with what is in your document
Reply With Quote
  #3  
Old 02-24-2013, 10:45 PM
macropod's Avatar
macropod macropod is offline Replacing text string within document, it's not retaining formatting Windows 7 64bit Replacing text string within document, it's not retaining formatting Office 2010 32bit
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

By default, the Find/Replace operation basically takes whatever format it finds for the first character in the string and applies its format to the whole of the replacement string.

The approach suggested by dougmadden will colour the braces as well.

To limit the formatting to a specific part of the replacement string would require a macro.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 02-24-2013, 11:06 PM
dougmadden@rogers.com dougmadden@rogers.com is offline Replacing text string within document, it's not retaining formatting Windows 7 64bit Replacing text string within document, it's not retaining formatting Office 2007
Novice
 
Join Date: Feb 2013
Posts: 4
dougmadden@rogers.com is on a distinguished road
Default He only wants to change the letters within the brackets

David I believe my response works because he is not replacing the bracket simply the letters within them.
Reply With Quote
  #5  
Old 02-25-2013, 12:33 AM
macropod's Avatar
macropod macropod is offline Replacing text string within document, it's not retaining formatting Windows 7 64bit Replacing text string within document, it's not retaining formatting Office 2010 32bit
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

Quote:
Originally Posted by dougmadden@rogers.com View Post
David I believe my response works because he is not replacing the bracket simply the letters within them.
I don't know who David is, but I do know your 'solution' won't work when the braces are part of the Find expression (so as to prevent other instances of Bm being found) - it changes the braces as well. Try it for yourself.

If the OP was doing a Find/Replace on only the 'Bm', the issue wouldn't arise - the 'Am' would adopt the same colour as the 'Bm' without any need to specify the replacement colour. You can confirm that too.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing text string within document, it's not retaining formatting Macro to create new word doc and save the file using String found in the document VBNation Word VBA 2 02-08-2013 07:14 AM
Replacing text string within document, it's not retaining formatting Replacing text with user input.?.?.? brad1977 Word 3 11-20-2012 10:20 AM
Replacing text string within document, it's not retaining formatting Help with replacing text with wildcards sbatson5 Word 2 04-13-2012 03:49 AM
Keep formatting when copying a text box between document. dhapp Word 0 07-15-2010 11:20 AM
Replacing / editting text LisaC Word 0 02-25-2010 03:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:32 PM.


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