V
Vince
I have what appears to be a simple problem which I can't seem to solve:
Sample text:
dajkdjasjdsajdasdasdsa BOLD daskjdskdsad bold
* Please note that BOLD and bold are in bold.
Code:
with activedocument.range.find
.ClearFormatting
.Font.bold = True
.MatchWildcards = True
.MatchCase = True
With .Replacement
.text = ConversionsForm.TextBox5.text & "^&" &
ConversionsForm.TextBox4.text
End With
.Execute Replace:=wdReplaceAll
End With
ConversionsForm.TextBox5.text="<b>"
ConversionsForm.TextBox4.text="</b>"
When I execute this, this is what I get:
dajkdjasjdsajdasdasdsa <B>BOLD</B> daskjdskdsad <b>bold</b>
What I want is:
dajkdjasjdsajdasdasdsa <b>BOLD</b> daskjdskdsad <b>bold</b>
Of course, it's not the word BOLD I am after. I do not know the words that
will appear in bold which is why I've used wildcards.
I've played around with MatchCase and all that in vain. Can somebody please
tell me how to do this?
Thank you,
Vince
Sample text:
dajkdjasjdsajdasdasdsa BOLD daskjdskdsad bold
* Please note that BOLD and bold are in bold.
Code:
with activedocument.range.find
.ClearFormatting
.Font.bold = True
.MatchWildcards = True
.MatchCase = True
With .Replacement
.text = ConversionsForm.TextBox5.text & "^&" &
ConversionsForm.TextBox4.text
End With
.Execute Replace:=wdReplaceAll
End With
ConversionsForm.TextBox5.text="<b>"
ConversionsForm.TextBox4.text="</b>"
When I execute this, this is what I get:
dajkdjasjdsajdasdasdsa <B>BOLD</B> daskjdskdsad <b>bold</b>
What I want is:
dajkdjasjdsajdasdasdsa <b>BOLD</b> daskjdskdsad <b>bold</b>
Of course, it's not the word BOLD I am after. I do not know the words that
will appear in bold which is why I've used wildcards.
I've played around with MatchCase and all that in vain. Can somebody please
tell me how to do this?
Thank you,
Vince