November 5th, 2004, 12:32 AM
Need help to include Auto Signature & Group Mail ID in sending mail through VB
I am sending mail through VB Excel Macro with the following code and it is working fine.
1.However in "To" field I would like use Group under which I have already defined Mail ID's to whom I want to send the mail.
For eg. I have created a Group as "Adi" as shown below and used in my To field,but it is not sending the mails.
If I directly hard code all the Mail ID's under this group in the To field below,mail goes successfully.
2.I would like to use Auto signature facility of Outlook while sending my mails using code below.It has been set in Outlook but when mail goes through this code,Auto Signature doesn't come.
Is there something like .Signature property which can be used or is there any other method to achieve the desired results.
Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
.To = "Adi"
.Cc = "email@example.com"
.Subject = "Model Office '" + OD1 + "' Cycle Details " + OD + " (Cycle Date : " + BWG + ") - " + OD3
.Body = "Please find MO '" + OD1 + "' cycle details in the spreadsheet attached below. This cycle was run on " + OD + " with cycle date of " + BWG + "." + vbCrLf + vbCrLf + vbCrLf + _
"All the files mentioned in the request form have been NDMed." + vbCrLf + vbCrLf + vbCrLf + "Pre-cycle and Post-cycle backups:" + vbCrLf + vbCrLf + "KKMP.U8AILMP" + OD1 + ".VBKP.BEFORE.DAILY.C" + aDate1 + vbCrLf + _
"KKMP.U8AILMP" + OD1 + ".VBKP.AFTER.DAILY.C" + aDate1
.Send 'Letīs go!
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
January 13th, 2013, 05:05 AM
Re: Need help to include Auto Signature & Group Mail ID in sending mail through VB
Your post is pretty old, have you found a solution yet? Because I'm looking for the exact same two things right now.
Thank you, regards
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!