asked on
ASKER
ASKER
ASKER
ASKER
Sub CallDelete
DelecteEndBlocks "C:\MyFolder"
End Sub
ASKER
Sub CallDelete()
DeleteEndBlocks "C:\Test"
End Sub
Sub DeleteEndBlocks(strFolder As String)
Dim strFile As String
Dim Doc As Document
Dim rng As Range
strFile = Dir$(strFolder & "\*.doc")
Do Until strFile = ""
Set Doc = Documents.Open(strFolder & "\" & strFile)
Set rng = Doc.Range
If rng.Find.Execute("Member 1 ^t^t^t^tDate^t^p") Then
rng.Collapse wdCollapseEnd
rng.End = Doc.Range.End
rng.Text = ""
Else
MsgBox "Expected text not found in " & strFile
End If
strDoc.Close wdSaveChanges
strFile = Dir$()
DoEvents
Loop
End Sub
ASKER
ASKER
ASKER
Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,
TRUSTED BY
In deleting those signature lines quickly, you can do this trick.
Just hold "Ctrl" of the keyboard, then select those lines that you would like to delete. Once the last 2 lines to be deleted are already selected, release the "Ctrl" key and you can press the Delete Key to delete those lines altogether.
In that way you can delete those lines easily.
I may suggest to try it with the first page, and see if that is what you want.
Just try it out.
Ed