VB create outlook mail WITH default signature
Posted on 2004-08-17
I am using a straightforward vbscript to create and display an e-mail with To, Subject, Attachment etc fields already completed. This works absolutely fine. The only problem I have is that I would like to also include the person who created the e-mail's default outlook signature if they have one. I have no idea how to do this and I have not been able to find a solution anywhere on the net.
The existing code I am using is below, I am using outlook 2000 and 2003 and this works on both.
Set objAppOutLook = CreateObject("Outlook.Application")
Set objOutlookNameSpace = objAppOutLook.GetNamespace("MAPI")
Set objOutlookMsg = objAppOutLook.CreateItem(0)
objOutlookMsg.To = "email@example.com"
objOutlookMsg.cc = "firstname.lastname@example.org"
objOutlookMsg.Subject = "Hello"
objOutlookMsg.Body = "Does it work?"
'objOutlookMsg.Attachments.Add attachment, 1, , attachment
objOutlookMsg.Importance = 2
set objAppOutLook = Nothing
set objOutlookNameSpace = Nothing
set objOutlookMsg = Nothing