Automating the selection of email accounts upon adding email addre

  • Thread starter Thread starter Sillyrabbit
  • Start date Start date
Status
Not open for further replies.
S

Sillyrabbit

I'm new to programming for Outlook - I'm not even sure this is the right

forum.

Is it possible to associate an email account to a person in your contacts

with Outlook 2007? - I have personal email accounts and business email

accounts. Everytime I add Thomas Smith to the To input, I'd like Outlook to

recognize it and set the account to from which the email will be sent to my

business account. If I'm sending an email to my brother, I want it to send it

from my personal account. - All while not having to manually select the

account, because I don't always remember.

In the event that both professional and personal contacts are on a single

email, I'd like Outlook to fire up an alert box reminding me to select the

correct email account.

Firing an alert box to remind me to select the correct account would be an

option if there is no way to associate the contact with a specific account.

Thanks in advance
 
For Outlook 2007 you can use the MailItem.SendUsingAccount object property

for that. You can select from the Accounts collection the appropriate

account to use to send based on the contact being sent to. For that you'd

get the Recipients collection of the email and get each Recipient You can

then use the Recipient.AddressEntry.GetContact() method to get the

ContactItem for that recipient object and check it for which account to use.

See the Object Browser in the Outlook VBA project for information on those

methods and properties and for sample code for them.

"Sillyrabbit" <Sillyrabbit> wrote in message

news:B87D095F-DACB-4293-B7E8-B689A4FCDA42@microsoft.com...
> I'm new to programming for Outlook - I'm not even sure this is the right
> forum.

> Is it possible to associate an email account to a person in your contacts
> with Outlook 2007? - I have personal email accounts and business email
> accounts. Everytime I add Thomas Smith to the To input, I'd like Outlook
> to
> recognize it and set the account to from which the email will be sent to
> my
> business account. If I'm sending an email to my brother, I want it to send
> it
> from my personal account. - All while not having to manually select the
> account, because I don't always remember.

> In the event that both professional and personal contacts are on a single
> email, I'd like Outlook to fire up an alert box reminding me to select the
> correct email account.

> Firing an alert box to remind me to select the correct account would be an
> option if there is no way to associate the contact with a specific
> account.

> Thanks in advance
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
I Automating message move between folders Outlook VBA and Custom Forms 0
R Automating from excel into shared Calendars Using Outlook 1
C Automating subject line Using Outlook 1
L automating a BCC on every email Using Outlook 1
T Automating Exporting to pst file Outlook VBA and Custom Forms 3
N Automating Outlook 2007 problem with sending mail Outlook VBA and Custom Forms 1
J Automating Word from script Outlook VBA and Custom Forms 8
S Outlook 2007: automating form with macro Outlook VBA and Custom Forms 2
S Default Selection For Multi-Select List Box Outlook VBA and Custom Forms 1
K Incorporate selection from combobox into body of email Outlook VBA and Custom Forms 0
S Need code to allow defined starting folder and selection from there to drill down Outlook VBA and Custom Forms 10
T Outlook Template - textbox visible based on combobox selection Using Outlook 1
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
Y Outlook Task View - Table Format - Customize Reminder Time to Drop-Down Selection Using Outlook 2
O Force account selection for sending reply emails Using Outlook 1
L Navigation Pane selection with shortcuts Using Outlook 2
C Force account selection - no reg path nor can create one Using Outlook 9
W Outlook: Uniquely identifying attachments in selection Using Outlook 0
D Selection of Send-From Account with Template VBA Shortcut Using Outlook 0
P Field option selection resulting into multiple questions BCM (Business Contact Manager) 0
K Default Account and Signature Selection Using Outlook 5
Y Changing colour of selection bar in Outlook (too light, needs to be grey) Using Outlook 4
P Outlook contact form no longer requiring Category selection to add new Using Outlook 1
N Changing the 'Mark item as read when selection changes' at runtime Outlook VBA and Custom Forms 1
P How to improve the email item selection event performance? Outlook VBA and Custom Forms 1
K How do I eliminate the "Enable Macro" selection? Outlook VBA and Custom Forms 16
C Eliminate need for "Enable Macro" selection Outlook VBA and Custom Forms 7
X Re: how to access current text selection Outlook VBA and Custom Forms 1
L Hide Selected Email Address from Address Book Using Outlook 5
Y QQ on Scheduled Delivery of an Email Using Outlook 0
T Replace Text in Email Subject Outlook VBA and Custom Forms 3
Rupert Dragwater Cannot reestablish gmail (email address) account in Outlook 365 Using Outlook 11
M Outlook 365 adding standard message in body of template email Outlook VBA and Custom Forms 3
E Create Rule to Forward Email if Subject Begins With Using Outlook 2
V iCloud For Windows v15.x - Missing Email Features ? Using Outlook 4
M Thunderbird email client - I wonder Using Outlook 1
D Outlook Desktop App Email Software Using Outlook 0
P Email and calendar entry text now shifts right about 3 tabs worth of space Using Outlook 1
J Outlook macro to run before email is being send Outlook VBA and Custom Forms 3
T Outlook 2010 Creating a email 'Group' in OL 2010 Using Outlook 2
D Send email from Outlook Alias using Mac? Using Outlook 0
T How to set Default FONT for Email composing ? Using Outlook 0
H Finding text in open email Outlook VBA and Custom Forms 12
T Why do Outlook Desktop 2021 tasks from my wife's email show up in my task pane? Using Outlook 2
A Opening a link from an email automatically Outlook VBA and Custom Forms 0
D Outlook 2021 New email reminder Using Outlook.com accounts in Outlook 1
Rupert Dragwater How do I remove an email ending with @gmail.com Using Outlook 4
M A plug in (or method) to keep email message formatting after it expires Using Outlook 1
L VBA to Triage Incoming Email Outlook VBA and Custom Forms 0
R Legacy Outlook on Mac Email Cache Using Outlook 0

Similar threads

Back
Top