F
Francis Hookham
I need to add '<B>' at the beginning and '</B>' at the end of the particular
paragraph then move to the beginning of the next paragraph. The following
works if the insertion point is at the beginning of the paragraph but falls
down if not.
I have tried various key combinations to try to get to the beginning of the
paragraph but if the insertion point is already there they fall down too.
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Please help
Francis Hookham
Sub htmlBold()
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.TypeText Text:="<B>"
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="</B>"
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
paragraph then move to the beginning of the next paragraph. The following
works if the insertion point is at the beginning of the paragraph but falls
down if not.
I have tried various key combinations to try to get to the beginning of the
paragraph but if the insertion point is already there they fall down too.
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Please help
Francis Hookham
Sub htmlBold()
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.TypeText Text:="<B>"
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="</B>"
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub