BCC on one of several email accounts

R

Randy

I'm trying to set up a VB routine that will automatically do a bcc on all
outgoing emails when sending from one particular email account. I have 4
email accounts that I use in Outlook 2003 and when I send an email from the
'sales' account, I want all emails bcc'd to another email account.

I've set up a routine that will bcc all emails (from all accounts) using
ItemSend, but I can't figure out how to make this happen for just a single
account. Any thoughts? Thanks.
 
S

Sue Mosher [MVP-Outlook]

Outlook doesn't provide any direct way to detect the account for an outgoing message. See
http://www.outlookcode.com/codedetail.aspx?id=889 for various workarounds that might fit your scenario.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
R

Randy

Thanks for the response Sue! Perhaps a more simple way to do what I need is
if I can get access to the 'From' address in the outgoing mail...is that
field accessible? I'd like to stay within the ItemSend application
subroutine....

It's been a while since I've done programming....is the whole email record
sent into ItemSend before the email is actually sent? Or, does ItemSend
just pass variable back to the mail item? If the email record is sent to
the ItemSend routine, does a list exist somewhere of the variables contained
within the Object record?


Outlook doesn't provide any direct way to detect the account for an outgoing
message. See
http://www.outlookcode.com/codedetail.aspx?id=889 for various workarounds
that might fit your scenario.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Unless the user has manually set a From address for a specific message, Outlook doesn't provide that information until *after* the item has been sent and is in the Sent Items folder.

The Item object passed as a parameter in the ItemSend event handler is the actual item that is in the process of being sent. The object browser (press F2 in VBA) can show you the MailItem properties.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
R

Randy

Isn't THAT just frustrating!!! hmmmmmm.....now what to do?! I see people
selling outlook add-in software that will do a Bcc for all emails, but I'm
sure they do it for all accounts too.

Once again, I appreciate your response. 'F2' was the magic list that I was
looking for.

I put the ItemSend object in the watch list and saw that the
'SenderEmailAddress' field is "" (blank). The only solution I can think of
is to write a macro that gets the mail from the Sent folder, extracts the
account info, then creates a new message and sends it. But, this seems real
messy.

When replying to a received email, can you tell me if there is a way to
extract the 'To' address from the received email during the ItemSend event?
If so, at least I can do a Bcc on email replys, but not on new emails
generated from that account. I looked through the object, but I can't seem
to find this info....I'm SURE it is there though!

-randy


Unless the user has manually set a From address for a specific message,
Outlook doesn't provide that information until *after* the item has been
sent and is in the Sent Items folder.

The Item object passed as a parameter in the ItemSend event handler is the
actual item that is in the process of being sent. The object browser (press
F2 in VBA) can show you the MailItem properties.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

The To information might be in any of these places:

1) The body of the reply item being sent, if you didn't delete the reply header.

2) Any message open in the Inspectors collection.

3) Application.ActiveExplorer.Selection(1) if you are replying to an item selected in a folder and haven't changed the selection since you started the reply.

4) None of the above.

What about writing a macro to (a) create the reply and (b) add the Bcc at the time of creation?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top