![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |