llldebaserll
12-08-2015, 10:56 AM
I'm sure this is probably somewhere in the forum but I can't find anything for the life of me.
I have a VBA macro set up creating emails and sending on behalf of various parties (using the .SendOnBehalfOfName property).
But there are a few instances where I want the emails created to be sent from the user's account.
But if I choose to not set the .SendOnBehalfOfName property, the From box is left blank and the user must manually enter in their email address.
Is there a way I can have the From box populated with the user's default Outlook address?
Below is the code I am using to determine whether to use the .SentOnBehalfOfName property or not. It pulls an email address from an .txtINI file. But if that user's .txtINI file preferences has a blank, I would like it to just default to their own email address.
If EmailFrom <> "" Then outmail.SentOnBehalfOfName = EmailFrom
Any help is greatly appreciated!
I have a VBA macro set up creating emails and sending on behalf of various parties (using the .SendOnBehalfOfName property).
But there are a few instances where I want the emails created to be sent from the user's account.
But if I choose to not set the .SendOnBehalfOfName property, the From box is left blank and the user must manually enter in their email address.
Is there a way I can have the From box populated with the user's default Outlook address?
Below is the code I am using to determine whether to use the .SentOnBehalfOfName property or not. It pulls an email address from an .txtINI file. But if that user's .txtINI file preferences has a blank, I would like it to just default to their own email address.
If EmailFrom <> "" Then outmail.SentOnBehalfOfName = EmailFrom
Any help is greatly appreciated!