#1   Report Post  
Graham
 
Posts: n/a
Default 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   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

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   Report Post  
Jay Freedman
 
Posts: n/a
Default

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   Report Post  
Graham
 
Posts: n/a
Default

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   Report Post  
Graham
 
Posts: n/a
Default

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   Report Post  
Graham
 
Posts: n/a
Default

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   Report Post  
Jay Freedman
 
Posts: n/a
Default

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   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

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   Report Post  
Graham
 
Posts: n/a
Default

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   Report Post  
Graham
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. Rachel King Microsoft Word Help 38 August 21st 09 09:54 PM
How do I delete all XE codes? nin Microsoft Word Help 1 June 18th 05 01:24 AM
Index field codes appear even when Hidden Text is turned off kscott25 Microsoft Word Help 3 May 10th 05 05:21 PM
Mail Merge some international postal codes displayed as "0" cmcintyre Mailmerge 0 April 18th 05 11:35 PM
Field Codes Meryl Microsoft Word Help 1 February 21st 05 07:07 AM


All times are GMT +1. The time now is 01:32 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"