Hi,
Please can you help to handle attach macro to let me choose which account will be used to send email as I have two in my PC.
Thanks,
Marsil
Hi Marsil,
Insert this snippet into your code after you've created objOutlookMsg
Dim Account As Outlook.Account For Each Account In objOutlook.Session.Accounts 'Debug.Print Account.DisplayName If Account.DisplayName = "Insert account name" Then objOutlookMsg.SendUsingAccount = Account End If Next
Insert the account name you want to use in place of the red text. If your not sure of the account name, uncomment the green line and all account names will be printed to the Immediate Window.
Regards
Phil
Hi Phil,
I really appreciate your help and time
It works perfectly. You are amazing! Thank you so much!
Just need help please, can you help to add other column to write another Path for another file.
Please check attached macro. "Red column"
Thanks;
Marsil
Hi Phil,
It is ok now as I changed the macro to add many attached files, but I face an issue to add below to select which Outlook account to send email.
please check attached file and I really appreciate your help and time to update the macro.
Dim Account As Outlook.Account For Each Account In objOutlook.Session.Accounts 'Debug.Print Account.DisplayName If Account.DisplayName = "Insert account name" Then objOutlookMsg.SendUsingAccount = Account End If Next
Thanks;
Marsil
Hi Marsil,
You insert in where I said to insert it in Reply #2 above.
Insert it after Set objOutlookMsg = objOutlook.CreateItem(0)
See attached.
Regards
Phil