![]() |
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 |
#9
|
|||
|
|||
![]()
Still waiting for an answer to my question: If the value of
SentOnBehalfOfName isn't "DisplayName," then what is it? That may indicate your next step. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Jeff C" wrote in message news ![]() Well, the code using If Item.SentOnBehalfOfName="DisplayName" then Works perfectly in Outlook 2003. I've tries it every which way in 2007 including using the Alias, and the actual email address without any luck. "Jeff C" wrote in message ... This suggestion works in Outlook 2003 but not in Outlook 2007, what changes need to be made? "Sue Mosher [MVP]" wrote: Outlook version? By "Send As account," do you mean that you're sending as another Exchange user? If so, try looking at the value of the SentOnBehalfOf property. "Jeff C" wrote in message ... I have been trying alternatives to the code below with no luck at all. The code works fine but am trying to add the if condition to only BCC the strBCC if I am using my Send As account in the exchange. Can anyone point me in the right direction? I think I am just missing something here. Thanks Private Sub Application_ItemSend(ByVal Item As Object, _ Cancel As Boolean) Dim objRecip As Recipient Dim strMsg As String Dim res As Integer Dim strBcc As String On Error Resume Next #### USER OPTIONS #### address for Bcc -- must be SMTP address or resolvable to a name in the address book strBcc = "MySendAsMailAddress" If Item.SenderEmailAddress = "mysendasmailaddress.com" Then Set objRecip = Item.Recipients.Add(strBcc) objRecip.Type = olBCC If Not objRecip.Resolve Then strMsg = "Could not resolve the Bcc recipient. " & _ "Do you want still to send the message?" res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _ "Could Not Resolve Bcc Recipient") If res = vbNo Then Cancel = True End If End If End If Set objRecip = Nothing End Sub . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using SenderEmailAddress | BrianL | Outlook and VBA | 8 | June 19th 07 02:32 PM |
senderemailaddress | marco | Outlook and VBA | 1 | June 7th 07 12:20 PM |
SenderEmailAddress in VB.NET on Outlook 2003 | [email protected] | Add-ins for Outlook | 1 | April 10th 07 03:27 PM |
Problem with Item.Size | Trent | Outlook - Using Forms | 0 | October 20th 06 03:41 PM |
How to change read only SenderName and SenderEmailAddress | [email protected] | Outlook - General Queries | 3 | April 19th 06 07:22 PM |