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 |
All times are GMT +1. The time now is 02:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com