Send & Receive Issues

Send Outlook Email from a Specific Account Using Access VBA

Tauseeq MagsiTauseeq Magsi Nov 22, 2026 869 views

Question details

Select a specific Outlook account when sending an email from Access VBA, or send on behalf of another mailbox with the appropriate permission.

Send Outlook Email from a Specific Account Using Access VBA
Product
Microsoft Access and Microsoft Outlook
Device & OS
not provided
Scenario
An Access VBA procedure creates an Outlook email, but the user needs to control which account or mailbox appears as the sender.
Observed behavior
The SentOnBehalfOfName property alone does not select an Outlook account for sending.
Before you start

In classic Outlook, check File > Account Settings > Account Settings to confirm that the account you want to use is configured in the current profile. If you need to send on behalf of another mailbox, ask its owner or an Exchange administrator to verify your permission.

Solution 1Recommended

Select a configured Outlook account with SendUsingAccount

Use this method when the desired sending account is configured in the Outlook profile used by Access.

SendUsingAccount selects an Account object from the Outlook session. It does not grant permission to send as or on behalf of another mailbox.

1
Find the account address

In classic Outlook, open File > Account Settings > Account Settings and note the email address of the account you want to use.

2
Add the VBA procedure

In Access, press Alt+F11, choose Insert > Module, and add this procedure. Replace the account and recipient addresses with your own: Sub CreateEmailFromAccount() Dim olApp As Object Dim olMail As Object Dim acct As Object Dim targetAccount As Object Set olApp = CreateObject("Outlook.Application") For Each acct In olApp.Session.Accounts If LCase(acct.SmtpAddress) = LCase("sender@example.com") Then Set targetAccount = acct Exit For End If Next acct If targetAccount Is Nothing Then MsgBox "The sending account was not found in the Outlook profile." Exit Sub End If Set olMail = olApp.CreateItem(0) Set olMail.SendUsingAccount = targetAccount olMail.To = "recipient@example.com" olMail.Subject = "Test message" olMail.Body = "Hello." olMail.Display End Sub

3
Review and send

Run CreateEmailFromAccount in the VBA editor. In the Outlook message window, verify the From account and message details, then click Send.

Select a configured Outlook account with SendUsingAccount
Account not found: The procedure searches accounts in the current Outlook session. Check the address and Outlook profile if the account is not found.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Office format support make it easy to move existing files. It does not configure Outlook accounts, Exchange permissions, or Access VBA email automation.

Open and edit Microsoft Office formats including DOCX, XLSX, and PPTXUse a familiar interface for everyday Office-style tasksWork with documents and spreadsheets alongside your email workflowGet started with a free, lightweight office suite
QA img-9

Frequently Asked Questions

Does SentOnBehalfOfName choose the Outlook account?

No. SentOnBehalfOfName identifies the mailbox represented in a delegated message. Use SendUsingAccount with an Account object from the Outlook session to select a configured sending account.

Where can I grant Send on Behalf permission?

The mailbox owner can check File > Account Settings > Delegate Access in their own classic Outlook if that option is available. Otherwise, ask an Exchange administrator to configure the mailbox permission.

Why is my account missing from the VBA Accounts collection?

Check File > Account Settings > Account Settings in classic Outlook and confirm that the account is configured in the profile used by the current Outlook session. Also check that the SMTP address in the VBA code matches.

Can I review the message before sending it?

Yes. Use olMail.Display instead of olMail.Send in your VBA procedure, then check the From field and click Send in the Outlook message window.