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
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
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
C Outlook 2007 Removing then adding account restores junk email processing Using Outlook 0
G Place jpg in body of email Outlook VBA and Custom Forms 1
F Wishlist Outlook suddenly began synchronizing deleted items every time I delete a single email. Using Outlook 2
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
HarvMan Toggle between calendar and email in Outlook 365 Using Outlook 7
F Email being marked as Spam by Gmail and not being visible in Outlook Using Outlook 5
G Email time stamp Using Outlook 2
G Schedule recurring email and attachments display Outlook VBA and Custom Forms 3
G Save and Rename Outlook Email Attachments Outlook VBA and Custom Forms 0
B Need to Copy an email to a subfolder Outlook VBA and Custom Forms 2
M How to setup outlook after importing old account information - Entering email account info creates with "(1)" after the account! Using Outlook 1
K Multiple Rules on Single Email Using Outlook 2
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
e_a_g_l_e_p_i Outlook 2010 How to set default email address for website links Using Outlook 3
O Same email address, same person, names in so many ways Using Outlook 4
D Create new email from the received Email Body with attachment Outlook VBA and Custom Forms 10
D Outlook launch email showing new unread email in reading pane Using Outlook 11
B Zoom automatically next email item (VBA) Outlook VBA and Custom Forms 2
K Outlook adds space to rows in HTML email signatures viewed on mobile Using Outlook 1
M HTML email signature in Outlook Using Outlook 3
M Respond to Outlook Email Outlook VBA and Custom Forms 0
U Outlook locking up when replying to Email Using Outlook 7
S Email Generated from another program and then edited sends original email. Using Outlook 2
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
S Unable to extract text from an Outlook email message Using Outlook 2
T Original email text not shown when replying or forwarding the email. Using Outlook 6
H Search Email Header for Content Type Outlook VBA and Custom Forms 1
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
R Problem moving file “Email folders.pst” to new PC Using Outlook 5
P Sending email from outlook IMAP to GMAIL where embedded images are added as attachment Using Outlook 1
D auto forward base on email address in body email Outlook VBA and Custom Forms 0

Similar threads

Top