PC Review


Reply
Thread Tools Rate Thread

BCC based upon TO address

 
 
Damon Longworth
Guest
Posts: n/a
 
      29th Jan 2010
Hello

I am trying to set add an address to the BCC field when a message is sent to
specific address. I have found some code to get the BCC, but do not know how
to find the address in the TO field.

How can I get the TO address into a string?

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objRec As Recipient
Set objRec = Item.Recipients.Add("(E-Mail Removed)")
objRec.Type = olBCC
objRec.Resolve
Set objRec = Nothing
End Sub
 
Reply With Quote
 
 
 
 
JP
Guest
Posts: n/a
 
      29th Jan 2010
Loop through the Recipients collection and check the Type property, it
will be olTo for anyone in the To field.

--JP

On Jan 29, 10:43*am, Damon Longworth
<DamonLongwo...@discussions.microsoft.com> wrote:
> Hello
>
> I am trying to set add an address to the BCC field when a message is sentto
> specific address. I have found some code to get the BCC, but do not know how
> to find the address in the TO field.
>
> How can I get the TO address into a string?
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> * * Dim objRec As Recipient
> * * Set objRec = Item.Recipients.Add("MyAddr...@domain.com")
> * * objRec.Type = olBCC
> * * objRec.Resolve
> * * Set objRec = Nothing
> End Sub

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically specify from email address based on send to address? Webtechie Microsoft Outlook Discussion 1 16th Mar 2009 01:16 PM
specify my FROM address based on TO recipients jamesd Microsoft Outlook Discussion 1 2nd May 2007 11:16 AM
Restrict based on IP address richard.mcgrath@gmail.com Microsoft ASP .NET 4 10th Nov 2005 12:32 AM
Map a drive based on the IP address of the PC Patrick Microsoft Windows 2000 Applications 5 1st Apr 2004 07:41 PM
Web based address book Eryk Microsoft Outlook Contacts 1 5th Sep 2003 01:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:27 AM.