Prompt for email account

Status
Not open for further replies.
T

Tom

I have three email accounts in Outlook 2007: an Excchange (ost) and 2

personal (pst.)

When I create a new mail message, I'd like to click on a button that then

prompts me for the account, and then creates a blank message (from the

selected account) for me to fill in.

I've done a fair amount of VBA Excel programming, but none in Outlook.

But I don't have the time to learn the Outlook object model for this

personal project.

Could someone provide me with the handful of lines necessary to accomplish

this?

Thanks!!

Tom
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
You don't want to get prompted automatically when creating a new message,

right? Why don't you then just hit the dropdown button for selecting an

account? That would be one click less.

if you want to code it yourself anyway, see the Accounts collection of the

Application.Session object. Display all the accounts in an appropriate

control on an MSForm, and write the selection into the

MailItem.SendUsingAccount property.

If you're looking for a ready-to-use solution, see the link in my signature

please. The SAM Add-in for Outlook can ask you for the sending account to

use.

Best regards

Michael Bauer

Am Mon, 5 Apr 2010 09:22:23 -0700 schrieb Tom:


> I have three email accounts in Outlook 2007: an Excchange (ost) and 2
> personal (pst.)

> When I create a new mail message, I'd like to click on a button that then
> prompts me for the account, and then creates a blank message (from the
> selected account) for me to fill in.

> I've done a fair amount of VBA Excel programming, but none in Outlook.

> But I don't have the time to learn the Outlook object model for this
> personal project.

> Could someone provide me with the handful of lines necessary to accomplish
> this?

> Thanks!!

> Tom
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Prompt to prefix subject line whenever sending an email Outlook VBA and Custom Forms 3
R Prompt asking the user to send email to folder as *.msg file Outlook VBA and Custom Forms 1
N Prompt for password when sending an email Exchange Server Administration 1
M Email Prompt Outlook VBA and Custom Forms 1
C How to fix outlook continuing to prompt fo an Exchange password Using Outlook 0
Paul Hobbs Automatically accept "Empty Folders" prompt Outlook VBA and Custom Forms 6
C VBA to prompt for Sent folder destination Outlook VBA and Custom Forms 3
Q Prompt button to auto turn on Out of Office Outlook VBA and Custom Forms 3
R Make Enter Network Password Prompt Go Away Automatically Using Outlook 0
K VBA to prompt and send a CC Outlook VBA and Custom Forms 6
K VBA - Prompt for reminder date time Outlook VBA and Custom Forms 7
S Have Rule or Quick Step PROMPT for custom FLAG Due/Reminder date Outlook VBA and Custom Forms 3
P Constant Username Password Prompt Using Outlook 2
A Prompt on exit to empty deleted items folder "for all accounts" does not work? Using Outlook 6
C Is there a way to prompt a user before deleting an item? BCM (Business Contact Manager) 4
S Prompt to add for text to existing subject line before sending. Using Outlook 9
S Trying to have a prompt to ask for text to be added to subject before sending. Using Outlook 3
O How to turn off the prompt to permanently delete messages upon exiting? Using Outlook 2
P Outlook security prompt after installing Add-in Outlook VBA and Custom Forms 3
Q Otlk 2007 does not block when in "always prompt for..." mode Outlook VBA and Custom Forms 2
Q sending mail when Otlook in 'always prompt for user name and passw Outlook VBA and Custom Forms 4
Rupert Dragwater How to permanently remove an email address Using Outlook 9
K vba code to auto download email into a specific folder in local hard disk as and when any new email arrives in Inbox/subfolder Outlook VBA and Custom Forms 0
F Auto changing email subject line in bulk Using Outlook 2
F Want to add second email to Outlook for business use Using Outlook 3
kburrows Outlook Email Body Text Disappears/Overlaps, Folders Switch Around when You Hover, Excel Opens Randomly and Runs in the Background - Profile Corrupt? Using Outlook 0
J Outlook 365 Outlook Macro to Sort emails by column "Received" to view the latest email received Outlook VBA and Custom Forms 0
A Outlook 2019 Help with forwarding email without mentioning the previous email sender. Outlook VBA and Custom Forms 0
J Macro to send email as alias Outlook VBA and Custom Forms 0
M Shift Delete doesn't delete email from server Using Outlook 4
K Incorporate selection from combobox into body of email Outlook VBA and Custom Forms 0
L Why are some email automatically going to "archive" Using Outlook 2
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
B Outlook 2019 Custom Email form - Edit default email form Outlook VBA and Custom Forms 6
F Add a category before "Send an Email When You Add an Appointment to Your Calendar" Outlook VBA and Custom Forms 0
T Problem when requesting to view an email in a browser Using Outlook 0
J Outlook 365 Forward Email Subject to my inbox when new email arrive in shared inbox Using Outlook 0
HarvMan Archive Email Manually Using Outlook 1
L Fetch, edit and forward an email with VBA outlook Outlook VBA and Custom Forms 2
S New Email "From" box stopped working Using Outlook 0
Rupert Dragwater Duplicate email in Folder Using Outlook 8
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
W Outlook 365 I am getting the "Either there is no default mail client" error when I try to send an email on excel Office 365 Using Outlook 1
MattC Changing the font of an email with VBA Outlook VBA and Custom Forms 1
L Specific Incoming Email Address Immediately Deleted Using Outlook 2
Witzker Outlook 2019 Macro to send an Email Template from User Defined Contact Form Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Edit contact from email does not open the user defined contactform Using Outlook 3
V Macro to mark email with a Category Outlook VBA and Custom Forms 4
R Roadrunner Email Settings | Contact Roadrunner Customer Support Outlook VBA and Custom Forms 1
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2

Similar threads

Top