View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
navin navin is offline
external usenet poster
 
Posts: 32
Default Changing From Address before sending mail

Hi,

I am trying to automate sending emails through excel which works fine
however, one of the requirement is that, before a mail is sent, i need
to change the From address for the mail, since we use different
generic mail ids for sending mails to our customers.

Currently i have to manually enter the From ID before i click on Send.
Below is the code, i am using to create a mail item:

Set olapp = CreateObject("Outlook.Application")
Set olmail = olapp.CreateItem(olMailItem)

olmail.Subject = ""
With olmail
.BodyFormat = olFormatHTML
.HTMLBody =
.To =
'.Display
.Send
End With

Please help!!!

Thank you in advance.

Navin