I am trying to create a macro to send a new email via outlook.
The problem is I have multiple accounts in my outlook and I one to select one of the accounts to send the email.
Any idea how I can solve this?
Txs!
This is my VBA code so far:
Dim olApp As Outlook.Application
Dim olEmail As Outlook.MailItem
Set olApp = New Outlook.Application
Set olEmail = olApp.CreateItem(olMailItem)
With olEmail
.BodyFormat = olFormatHTML
.Display
.CC = ""
.Subject = "New email"
End With
The problem is I have multiple accounts in my outlook and I one to select one of the accounts to send the email.
Any idea how I can solve this?
Txs!
This is my VBA code so far:
Dim olApp As Outlook.Application
Dim olEmail As Outlook.MailItem
Set olApp = New Outlook.Application
Set olEmail = olApp.CreateItem(olMailItem)
With olEmail
.BodyFormat = olFormatHTML
.Display
.CC = ""
.Subject = "New email"
End With