PDA

View Full Version : Concatenate "<b>" & </b> To Bold Items



deejayclutch
06-06-2005, 03:43 PM
I am really new, and I have spent the last 3 days searching and reading trying to find out how to do this.

I want to search through any document, and add <b> to the front of every bold item and </b> to the back of every bold item.

Any hints, code, or help would greatly be appreciated.

Any similar problems with solutions that I can learn from would help also.

So far I can find bold items:

With selectionRange.Find
.Font.Bold = True
.Wrap = wdFindContinue
.Execute
If .Found = True Then
End With

But I can't seem to do anything with them.

Thanks for your time.

-Camille

TonyJollans
06-06-2005, 05:47 PM
Hi Camille,

You don't need code for this - you can do it with Find and Replace ..

Press Ctrl+h to bring up the Replace Dialog
If there is a More button, press it
Click in the Find what box
If it is not greyed out, click on the No Formatting button
Click on the Format button - and choose Font
In the Font Dialog, select Bold under Font Style
Press OK
Click in the Replace with box
If it is not greyed out, click on the No Formatting button
Enter <b>^&</b>
Click on Replace All
Click on Close to end the dialog

You can record it if you want code.

deejayclutch
06-07-2005, 09:02 AM
Thanks so much, that did the trick. :)

MOS MASTER
06-07-2005, 09:28 AM
Thanks so much, that did the trick. :)
Hi and Welcome to VBAX! :hi:

Don't forget to mark your thread solved? :whistle:

deejayclutch
06-07-2005, 09:59 AM
I keep marking it as solved, but it won't work?!?!?

MOS MASTER
06-07-2005, 10:31 AM
I keep marking it as solved, but it won't work?!?!?
Hi Deejay, :yes

Ah..ok that's strange. No problem I'll have on of the Admins look at it.

Thank you. :whistle:

Zack Barresse
06-07-2005, 11:49 AM
Hmm, strange indeed. Did you go to Thread Tools | Mark Thread Solved | Perform Action ..? I have made the adjustment myself. If this problem persists, please let a Moderator or Administrator know and we'll look into it. I could not see anything in your user account/settings that would adversley effect this.

here ya go I took the liberty of adding them to your first post, hope you don't mind. :)

MOS MASTER
06-07-2005, 11:56 AM
Thanks...Zack! :yes