J
Jackie Damrau
I have the following two macros that I need to combine into one which I want
to delete two lines throughout a document. Each line starts with "(Contact
Network: <variable text>)" and "(Status: <variable text>)". These work great
separately, but not together.
Can someone please show me how to combine these to work as one?
-----
Sub RemoveContact()
'
' RemoveContact Macro
' Macro created 8/12/2004 by jackie.damrau
'
Dim oRng As Range
ResetSearch
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "(Contact Network:"
While .Execute
oRng.Paragraphs(1).Range.Delete
Wend
End With
ResetSearch
End Sub
Sub RemoveStatus()
'
' RemoveStatus Macro
' Macro created 8/12/2004 by jackie.damrau
'
Dim oRng As Range
ResetSearch
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "(Status:"
While .Execute
oRng.Paragraphs(1).Range.Delete
Wend
End With
ResetSearch
End Sub
to delete two lines throughout a document. Each line starts with "(Contact
Network: <variable text>)" and "(Status: <variable text>)". These work great
separately, but not together.
Can someone please show me how to combine these to work as one?
-----
Sub RemoveContact()
'
' RemoveContact Macro
' Macro created 8/12/2004 by jackie.damrau
'
Dim oRng As Range
ResetSearch
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "(Contact Network:"
While .Execute
oRng.Paragraphs(1).Range.Delete
Wend
End With
ResetSearch
End Sub
Sub RemoveStatus()
'
' RemoveStatus Macro
' Macro created 8/12/2004 by jackie.damrau
'
Dim oRng As Range
ResetSearch
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "(Status:"
While .Execute
oRng.Paragraphs(1).Range.Delete
Wend
End With
ResetSearch
End Sub