Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Special Formatting Characters

Status
Not open for further replies.

noHandlebars

Technical User
Jun 25, 2008
46
US
I know this is a pretty simple question, but what are the special characters to force bold, underline, and italalics.
 
Record a macro and click bold, italic and underline

HTH,

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
That doesnt quite work for my code. I'm wondering if there's certain special characters that represent bold, italic, and underline.

Here's a copy of my code:
With ActiveDocument.Content
.Find.Execute FindText:="Section C.4"
TextStart = .Start
.Collapse wdCollapseEnd
.Find.Execute FindText:="Section C.5B:"
.Collapse wdCollapseStart
.Start = TextStart
.Delete
'.Font.Bold = False
'.InsertBreak wdPageBreak
.InsertAfter "The following "
.Font.Italic = True
.Font.Underline = wdUnderlineSingle
.InsertAfter "consecutive"
'.Font.Italic = False
'.Font.Underline = wdUnderlineNone
.InsertAfter " sections from the questionnaire have been removed because they are not relevant to facility operations:"
.InsertAfter vbNewLine
.InsertAfter vbNewLine
.InsertAfter vbNewLine
.Font.Bold = True
.InsertAfter "SECTION C.4: UNIT DESIGN - THERMAL TREATMENT/INCINERATOR"
.InsertAfter vbNewLine
.InsertAfter vbNewLine
.InsertAfter "SECTION C.5A: UNIT DESIGN - LANDFILLS"
.InsertParagraphAfter
.Collapse wdCollapseEnd
.InsertBreak wdPageBreak
End With
 
Hi noHandlebars,

You've already got them in the code you posted:
.Font.Bold = True/False
.Font.Italic = True/False
.Font.Underline = wdUnderlineSingle, etc

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top