Link to home
Start Free TrialLog in
Avatar of richierichie
richierichie

asked on

VB create outlook mail WITH default signature

Hi,

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.

Dim objAppOutLook
Dim objOutlookMsg
Dim objOutlookNameSpace

Set objAppOutLook = CreateObject("Outlook.Application")
Set objOutlookNameSpace = objAppOutLook.GetNamespace("MAPI")
objAppOutLook.Session.Logon
Set objOutlookMsg = objAppOutLook.CreateItem(0)
 
objOutlookMsg.To = "test@test.com"
objOutlookMsg.cc = "test@test.com"
objOutlookMsg.Subject = "Hello"
objOutlookMsg.Body = "Does it work?"
'objOutlookMsg.Attachments.Add attachment, 1, , attachment
objOutlookMsg.Importance = 2
objOutlookMsg.Display

objAppOutLook.Session.Logoff
set objAppOutLook = Nothing
set objOutlookNameSpace = Nothing
set objOutlookMsg = Nothing

cheers

Richard
ASKER CERTIFIED SOLUTION
Avatar of realrael
realrael

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial