For each Execution of the DeleteSel function, a "WINWORD" is opened in memory, even with the Close command and / or Quit it does not close.
Sub DeleteSel(msg As Outlook.MailItem)
Dim objDoc As Object
Dim objBkm As Object
Set objDoc = CreateObject("Word.Application")
objDoc.Visible = True
objDoc.Activate
On Error Resume Next
Set objDoc = msg.GetInspector.WordEditor
Set objBkm = objDoc.Bookmarks("_MailAutoSig")
If Not objBkm Is Nothing Then
objBkm.Select
objDoc.Windows(1).Selection.Delete
End If
objDoc.Close
objBkm.Close
Set objBkm = Nothing
Set objDoc = Nothing
End Sub
Would anyone have any tips?