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
 
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
R Legacy Outlook on Mac Email Cache Using Outlook 0
P Email address auto-completes work fine on laptop, but no longer on desktop Using Outlook 3
S Create Outlook Task from Template and append Body with Email Body Outlook VBA and Custom Forms 4
H Copying email address(es) in body of email and pasting in To field Outlook VBA and Custom Forms 1
A Search folder and move the email Outlook VBA and Custom Forms 0
P VBA to add email address to Outlook 365 rule Outlook VBA and Custom Forms 0
farrissf Outlook 2016 Optimizing Email Searches in Outlook 2016: Seeking Insights on Quick Search vs Advanced Search Features Using Outlook 0
D Delete selected text in outgoing email body Outlook VBA and Custom Forms 0
F Graphics in email / Mac recipient garbled Using Outlook 0
D Outlook VBA forward the selected email to the original sender’s email ID (including the email used in TO, CC Field) from the email chain Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to seach in all contact Folders for marked Email Adress Outlook VBA and Custom Forms 1
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
S Email Macros to go to a SHARED Outlook mailbox Draft folder...NOT my personal Outlook Draft folder Using Outlook 2
R Outlook 365 VBA AUTO SEND WITH DELAY FOR EACH EMAIL Outlook VBA and Custom Forms 0
G Print email attachments when hit subfolder Outlook VBA and Custom Forms 1
C Spam Email? Using Outlook 2
G Automatically delete email when a condition is met Outlook VBA and Custom Forms 1
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
S Email was migrated from GoDaddy to Microsoft exchange. We lost IMAP ability Exchange Server Administration 1
R Outlook 365 How to integrate a third-party app with Outlook to track email and sms? Using Outlook 2
S Paperclip icon shows without attachment in email under Sent folder Using Outlook 0
B Outlook 2019 Automatically move email after assigning category Using Outlook 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 4
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

Similar threads

Back
Top