Discussion Locked

Inserting "If" statement in Word Macro

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

What's the syntax to insert the indicated "if"?

Selection.Find.ClearFormatting
With Selection.Find
.Text = "^p^pSupplies, Equipment"
other parm's here.......
End With
Selection.Find.Execute
>>>>>>If the above is "found" do:
Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=8, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
>>>>>>EndIf

Thanks

3 replies

by cas

Thanx.... I knew what I wanted to do, just didn't have the syntax in this language...... :>

This discussion is closed to new replies.