S
Sahana
Hi
i m trying to write a code which adds <br> when a new line is added or
when ENTER is pressed.
I have a sample code when enables me to add <b> when a word is
boldfaced. Help in anyform is appreciated.
the code that adds <b> when a word is bold faced.
Selection.HomeKey wdStory
Selection.FInd.ClearFormatting
With Selection.FInd.Font
.bold = True
End With
With Selection.FInd
Do While .Execute(FindText:="", Forward:=True,
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
With Selection
If Left(.Paragraphs(1).Style, 4) <> "Head" Then
.Font.bold = False
.InsertBefore "<b>"
.InsertAfter "</b>"
End If
.Collapse wdCollapseEnd
End With
Loop
End With
End Sub
i m trying to write a code which adds <br> when a new line is added or
when ENTER is pressed.
I have a sample code when enables me to add <b> when a word is
boldfaced. Help in anyform is appreciated.
the code that adds <b> when a word is bold faced.
Selection.HomeKey wdStory
Selection.FInd.ClearFormatting
With Selection.FInd.Font
.bold = True
End With
With Selection.FInd
Do While .Execute(FindText:="", Forward:=True,
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
With Selection
If Left(.Paragraphs(1).Style, 4) <> "Head" Then
.Font.bold = False
.InsertBefore "<b>"
.InsertAfter "</b>"
End If
.Collapse wdCollapseEnd
End With
Loop
End With
End Sub