问题
I am using the below code that I found for a new template but I want to delete the signature.
I either need code to delete the signature after the below code or a completely new code that opens a new email, clears body then inserts template.
Sub NewTemplate()
Set objMsg = Application.CreateItemFromTemplate("S:\filepath.oft")
Set newItem = Nothing
With objMsg
.SentOnBehalfOfName = "email@email.com"
.Display
End With
End Sub
回答1:
Set objDoc = objMsg.GetInspector.WordEditor
If objDoc.Bookmarks.Exists("_MailAutoSig") Then
set objBkm = objDoc.Bookmarks("_MailAutoSig")
objBkm.Select
objDoc.Windows(1).Selection.Delete
End If
来源:https://stackoverflow.com/questions/36467499/deleting-signature-after-createitemtemplate