automatic BCC based on sending account (Outlook 2000 IMO)

  • Thread starter Thread starter Ethan Shayne
  • Start date Start date
E

Ethan Shayne

I've used the VBA code on the Slipstick site
(http://www.slipstick.com/dev/code/autobcc.htm) to automatically BCC
myself on all outgoing messages (using Outlook 2000 in IMO mode), and
this works fine. However, I have Outlook configured with more than one
email account. Ideally, I'd like to have email sent from each account
to get a BCC back to whichever account was used to send it - not have
all emails from any account BCC'd to only one address, always.

I found another article explaining how to write VBA code to find the
sender's email address
(http://www.win2000mag.com/Articles/Index.cfm?ArticleID=8630), but
this doesn't seem to work from within Application_ItemSend - the
sender's address always come up empty. Same if I try to just use
Item.SenderName. I suspect this is because at the point when I'm
trying to check for this, the message hasn't actually been sent yet.

Is there a way to get the account used to send an email from within
Application_ItemSend?

Thanks,
Ethan
 
Unfortunately, the object model doesn't expose accounts for programmatic
manipulation. You could probably fudge it though. If you created a rule to
move messages sent to a specific account to specific folders, you can then
reply to those messages after they've been moved now that you know which
account they were sent to. You can write this rule in VBA completely to do
it all, or trap the Item_Add event of the Items collection for all of these
container folders to automate the reply.
 
Back
Top