Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Inserting codes
I need to be able to detect bold, italic, superior and inferior characters in
word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily |
#2
|
|||
|
|||
The way you phrased this question is a bit confusing, but I think this will
answer it: In the Find & Replace box, click on More. Then use the Format dropdown menu in the F&R dialog to format the find or the replace box as italic, superscript, etc, which will let you find and replace characters formatted that way. On 7/13/05 7:12 AM, "Graham" wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily -- Daiya Mitchell, MVP Mac/Word Word FAQ: http://www.word.mvps.org/ MacWord Tips: http://www.word.mvps.org/MacWordNew/ What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/ |
#3
|
|||
|
|||
Graham wrote:
I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#4
|
|||
|
|||
Hi Jay
Guess I didn't explain the problem properly I have a formated word doc - what I need to do is replace the formatting with code ie: where a word/s are bold ineed to put in opening bold code WORD closing bold code etc I need to be able to do this from a macro so need to know how to replace the hidden codes for bold italic etc. Hope this explains the proble better. Graham "Jay Freedman" wrote: Graham wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#5
|
|||
|
|||
Hi Jay
Guess I didn't explain the problem properly I have a formated word doc - what I need to do is replace the formatting with code ie: where a word/s are bold ineed to put in opening bold code WORD closing bold code etc I need to be able to do this from a macro so need to know how to replace the hidden codes for bold italic etc. Hope this explains the proble better. Graham "Jay Freedman" wrote: Graham wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#6
|
|||
|
|||
Hi Daiya
Guess I didn't explain the problem properly I have a formated word doc - what I need to do is replace the formatting with code ie: where a word/s are bold ineed to put in opening bold code WORD closing bold code etc I need to be able to do this from a macro so need to know how to replace the hidden codes for bold italic etc. Hope this explains the proble better. Graham "Daiya Mitchell" wrote: The way you phrased this question is a bit confusing, but I think this will answer it: In the Find & Replace box, click on More. Then use the Format dropdown menu in the F&R dialog to format the find or the replace box as italic, superscript, etc, which will let you find and replace characters formatted that way. On 7/13/05 7:12 AM, "Graham" wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily -- Daiya Mitchell, MVP Mac/Word Word FAQ: http://www.word.mvps.org/ MacWord Tips: http://www.word.mvps.org/MacWordNew/ What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/ |
#7
|
|||
|
|||
Hi Graham,
You did explain properly, with the small exception that you want to use a macro. The procedure I gave you will do exactly what you asked, but manually. Have you tried it? Possibly the easiest way to get a macro is to record the manual steps as described at http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm. Because the recorder has a bug, though, you'll then have to modify the recorded macro as explained in http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm. Once you have the italics part of the macro operating correctly, you can copy the code (except for the Sub and End Sub statements) and paste it three more times just before the End Sub line, then change "italic" to "bold", "subscript", and "superscript" in the copies. Running the completed macro will make all four replacements, one after another. One bit of possible misunderstanding: There are NO "hidden codes" for formatting in Word. You aren't replacing codes, you're working with properties of the text. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Graham wrote: Hi Jay Guess I didn't explain the problem properly I have a formated word doc - what I need to do is replace the formatting with code ie: where a word/s are bold ineed to put in opening bold code WORD closing bold code etc I need to be able to do this from a macro so need to know how to replace the hidden codes for bold italic etc. Hope this explains the proble better. Graham "Jay Freedman" wrote: Graham wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#8
|
|||
|
|||
Note also that you can get Format: Italic by pressing Ctrl+I and Format: Not
Italic by pressing it twice. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Jay Freedman" wrote in message ... Graham wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#9
|
|||
|
|||
Thanks again Jay
Silly me _ I looked at your reply in Netscape and couldn't make it out it all became clear when viewd in ie. Yes have tried it manually and it works fine will now try it in a macro just as a further help could you send me the codes for the italic properties and sub and super script as they may prove very useful Thanks again Graham "Jay Freedman" wrote: Hi Graham, You did explain properly, with the small exception that you want to use a macro. The procedure I gave you will do exactly what you asked, but manually. Have you tried it? Possibly the easiest way to get a macro is to record the manual steps as described at http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm. Because the recorder has a bug, though, you'll then have to modify the recorded macro as explained in http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm. Once you have the italics part of the macro operating correctly, you can copy the code (except for the Sub and End Sub statements) and paste it three more times just before the End Sub line, then change "italic" to "bold", "subscript", and "superscript" in the copies. Running the completed macro will make all four replacements, one after another. One bit of possible misunderstanding: There are NO "hidden codes" for formatting in Word. You aren't replacing codes, you're working with properties of the text. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Graham wrote: Hi Jay Guess I didn't explain the problem properly I have a formated word doc - what I need to do is replace the formatting with code ie: where a word/s are bold ineed to put in opening bold code WORD closing bold code etc I need to be able to do this from a macro so need to know how to replace the hidden codes for bold italic etc. Hope this explains the proble better. Graham "Jay Freedman" wrote: Graham wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#10
|
|||
|
|||
Hi Jay
Many thanks for all your help. Macro works fine (except for sub and super but this is a problem with cut and past from PDF's nothing to do with word) but just the bold and italic working will save me hours of coding. Thanks again Graham "Jay Freedman" wrote: Hi Graham, You did explain properly, with the small exception that you want to use a macro. The procedure I gave you will do exactly what you asked, but manually. Have you tried it? Possibly the easiest way to get a macro is to record the manual steps as described at http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm. Because the recorder has a bug, though, you'll then have to modify the recorded macro as explained in http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm. Once you have the italics part of the macro operating correctly, you can copy the code (except for the Sub and End Sub statements) and paste it three more times just before the End Sub line, then change "italic" to "bold", "subscript", and "superscript" in the copies. Running the completed macro will make all four replacements, one after another. One bit of possible misunderstanding: There are NO "hidden codes" for formatting in Word. You aren't replacing codes, you're working with properties of the text. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Graham wrote: Hi Jay Guess I didn't explain the problem properly I have a formated word doc - what I need to do is replace the formatting with code ie: where a word/s are bold ineed to put in opening bold code WORD closing bold code etc I need to be able to do this from a macro so need to know how to replace the hidden codes for bold italic etc. Hope this explains the proble better. Graham "Jay Freedman" wrote: Graham wrote: I need to be able to detect bold, italic, superior and inferior characters in word docs in order to replace with and on off code ie: isome text/i is it possible to do this easily Yes. In the Replace dialog, click the More button. Click in the Find What box, click the Format button, select Font, and click Italic in the dialog. When you click OK there, the words "Font: Italic" appear below the Find What box. Now click in the Replace With dialog and enter i^&/i If you want the result to be plain instead of italic, click the Format button, select Font, and click Not Italic in the dialog. Finally, click the Replace All button. You can do the same kind of replacement with the other font formats. It would be advisable to click the No Formatting button for each of the Find What and Replace With boxes between searches so each one starts fresh. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. | Microsoft Word Help | |||
How do I delete all XE codes? | Microsoft Word Help | |||
Index field codes appear even when Hidden Text is turned off | Microsoft Word Help | |||
Mail Merge some international postal codes displayed as "0" | Mailmerge | |||
Field Codes | Microsoft Word Help |