A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outgoing rule on BCC



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 27th 06, 03:08 PM posted to microsoft.public.outlook
[email protected]
external usenet poster
 
Posts: 2
Default Outgoing rule on BCC

I'm trying to set up a rule to move all messages that I send which have
specific names in the BCC field.
This is an outbound mail rule (i.e. "Check messages after sending" in
the new rules creation wizzard), so I can see who I'm sending to in
each of the fields (To, CC, and BCC). The rules wizzard allows for
watching rules sent through a specific account, but I cannot see how to
filter the BCC field.

Any help would be appreciated. If this is not possible through the
wizzard, I am willing to program this with VBA; however, any pointers
to which objects in the Outlook DOM would be greatly appreciated!

(PS. I'll post all code I develop for this back here and/or on
microsoft.public.outlook.vba)

Kind regards,
Kevin

  #2  
Old November 27th 06, 03:19 PM posted to microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outgoing rule on BCC

You would have to code this in VBA. Use the Application_ItemSend event, which passes the outgoing item as a parameter. The Recipients collection is exactly what the name implies. Check each Recipient.Type property to learn which is a Bcc. Or use the MailItem.Bcc property.

Also note that you can't move an item as it's being sent. You can, however, change the SaveSentMessageFolder property to point to a specific folder in the user's default store.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message ups.com...
I'm trying to set up a rule to move all messages that I send which have
specific names in the BCC field.
This is an outbound mail rule (i.e. "Check messages after sending" in
the new rules creation wizzard), so I can see who I'm sending to in
each of the fields (To, CC, and BCC). The rules wizzard allows for
watching rules sent through a specific account, but I cannot see how to
filter the BCC field.

Any help would be appreciated. If this is not possible through the
wizzard, I am willing to program this with VBA; however, any pointers
to which objects in the Outlook DOM would be greatly appreciated!

(PS. I'll post all code I develop for this back here and/or on
microsoft.public.outlook.vba)

Kind regards,
Kevin

  #3  
Old November 27th 06, 09:25 PM posted to microsoft.public.outlook
[email protected]
external usenet poster
 
Posts: 2
Default Outgoing rule on BCC

Thank you very much. This is what I've come up with and it seems to
work pretty well. If you create a folder "FolderXYZ" or replace the
text with your own folder name, and replace "Doe, John" with how your
name appears when typed into a recipient field, this should work.

Enjoy,
Kevin

===============

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
Dim objMailItem As MailItem
Dim objInbox As Outlook.MAPIFolder
Dim objFolder As Outlook.MAPIFolder

Set objInbox = Application.Session.GetDefaultFolder(olFolderInbox )
Set objFolder = objInbox.Folders("FolderXYZ")
Set objMailItem = Item

If objMailItem.BCC = "Doe, John" Then
Set objMailItem.SaveSentMessageFolder = objFolder
End If

Set objMailItem = Nothing
Set objInbox = Nothing
Set objFolder = Nothing

End Sub

=================

On Nov 27, 10:19 am, "Sue Mosher [MVP-Outlook]"
wrote:
You would have to code this in VBA. Use the Application_ItemSend event, which passes the outgoing item as a parameter. The Recipients collection is exactly what the name implies. Check each Recipient.Type property to learn which is a Bcc. Or use the MailItem.Bcc property.

Also note that you can't move an item as it's being sent. You can, however, change the SaveSentMessageFolder property to point to a specific folder in the user's default store.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in oglegroups.com...
I'm trying to set up a rule to move all messages that I send which have
specific names in the BCC field.
This is an outbound mail rule (i.e. "Check messages after sending" in
the new rules creation wizzard), so I can see who I'm sending to in
each of the fields (To, CC, and BCC). The rules wizzard allows for
watching rules sent through a specific account, but I cannot see how to
filter the BCC field.


Any help would be appreciated. If this is not possible through the
wizzard, I am willing to program this with VBA; however, any pointers
to which objects in the Outlook DOM would be greatly appreciated!


(PS. I'll post all code I develop for this back here and/or on
microsoft.public.outlook.vba)


Kind regards,
Kevin


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I set rule for BCC Ed [MCT] Outlook - General Queries 1 October 17th 06 10:04 AM
Rule for the from field on outgoing mail ? Kristofer Outlook - General Queries 0 September 22nd 06 09:03 PM
Rule that will BCC recepients [email protected] Outlook - General Queries 5 June 26th 06 11:35 AM
Automatic BCC for outgoing mail - howto? Maria Outlook Express 8 March 20th 06 10:44 PM
outgoing email with bcc copy automatically Paul Outlook Express 5 February 26th 06 03:15 AM


All times are GMT +1. The time now is 05:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.