Hi, all.
okay, this is what I'm trying to do. I've already written the code where the application picks out certain people's ID and find their Email IDs, and then it will run Outlook from VBA and send email to each person selected. I've got all of that to work. But I have one question. I was wondering if there's a way that I can code it, so when the emails are sent, a more general name (such as "Shipping Services" appear in the 'From' field of the email instead of the email ID or address of the sender. The following is how I run outlook to send emails:
'start outlook application:
Set lobjOutlook = CreateObjec("Outlook.application"
'create new mail item (0):
Set lobjMail = lobjOutlook.createitem(0)
Let lobjMail.subject = lstrSubject
Let lobjMail.HTMLBody = lstrBody 'add body
Let lobjMail.to = lstrTo 'apply To list
''(the next two lines are not needed in this case)
'Let objMail.cc = lstrCc 'apply CC list
'Let lobjMail.bcc = lstrBCC 'apply bcc list
lobjMail.send
lobjOutlook.Quit
I was wondering if there's any method like ' .from' or some sort, that will allow me to change the From Field, like it does to the To Field and CC Field. (apparently lobjMail.from method does not exist )
if anyone knows how to make this work, PLEASE HELP ME?!!!?
Thanks a lot
okay, this is what I'm trying to do. I've already written the code where the application picks out certain people's ID and find their Email IDs, and then it will run Outlook from VBA and send email to each person selected. I've got all of that to work. But I have one question. I was wondering if there's a way that I can code it, so when the emails are sent, a more general name (such as "Shipping Services" appear in the 'From' field of the email instead of the email ID or address of the sender. The following is how I run outlook to send emails:
'start outlook application:
Set lobjOutlook = CreateObjec("Outlook.application"
'create new mail item (0):
Set lobjMail = lobjOutlook.createitem(0)
Let lobjMail.subject = lstrSubject
Let lobjMail.HTMLBody = lstrBody 'add body
Let lobjMail.to = lstrTo 'apply To list
''(the next two lines are not needed in this case)
'Let objMail.cc = lstrCc 'apply CC list
'Let lobjMail.bcc = lstrBCC 'apply bcc list
lobjMail.send
lobjOutlook.Quit
I was wondering if there's any method like ' .from' or some sort, that will allow me to change the From Field, like it does to the To Field and CC Field. (apparently lobjMail.from method does not exist )
if anyone knows how to make this work, PLEASE HELP ME?!!!?
Thanks a lot