signature and choose account

  • Thread starter Thread starter Patt Ehret
  • Start date Start date
P

Patt Ehret

Hi there,

i would like to know if somebody can tell me how this could work or where i
can found the code?

I would like to have a button in the toolbar. if i click, it will open a new
text email message, using a specific email account and add a specific
signature to the email body.

I have several accounts. Everytime i have to write a new email message the
sender account is different. If i forget to change the account the default
account is used.

Do you understand?

Any helps are really appreciated.

Patt
 
Hi Eric,

yes i use 2003 and i know the signature feature. Isn't there a way to
simulate the button click by a script to simulate the click on the account
name?

Regards

Patt



Eric Legault said:
Do you have Outlook 2003? This version supports specific default
signatures for individual e-mail accounts.
Also, you can't choose the sending account programmatically, but you can
choose a specific signature to insert.
See my post at
http://www.microsoft.com/office/com..._vba&mid=8b637ac4-47ba-4220-99ae-c163194ecbff
for an example.
 
The problem is that you cannot programmatically set the Account that the e-mail is using. You can get around this *after* the e-mail is created by iterating through the CommandBarButton controls in the CommandbarBarPopUp.Controls collection for the Accounts button on the Standard toolbar and executing the appropriate one.

But then you'd have to clear the message body or else turn off a default signature for your default account, as you'd still need to programmatically execute one of the Signature menu entries to insert the one you'd want.

This may not work for you if you need to create the message from scratch - the solution I outlined above would need be run from a new e-mail you manually create.

I have the same problem you do - I forget sometimes that I wanted to use a different account after I already sent the e-mail. There may be a way to read the name of the chosen sending account (using CDO only though), and code could run before the message is sent to popup a confirmation box. I plan on looking into this soon.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/



Patt Ehret said:
Hi Eric,

yes i use 2003 and i know the signature feature. Isn't there a way to
simulate the button click by a script to simulate the click on the account
name?

Regards

Patt



Eric Legault said:
Do you have Outlook 2003? This version supports specific default
signatures for individual e-mail accounts.
Also, you can't choose the sending account programmatically, but you can
choose a specific signature to insert.
See my post at
http://www.microsoft.com/office/com..._vba&mid=8b637ac4-47ba-4220-99ae-c163194ecbff
for an example.
 
Back
Top