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 and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Recipient.Address in Exchange Server



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 8th 06, 12:11 AM posted to microsoft.public.outlook.program_vba
Joel
external usenet poster
 
Posts: 48
Default Recipient.Address in Exchange Server

TIA:

In earlier email I have following code:

Sub Send_Attachment_Messages()

Dim oFolder As Outlook.MAPIFolder
Dim Items As Outlook.Items
Dim objItem As MailItem
Dim Recips As Recipients
Dim Recip As Recipient

Set Items =
Application.GetNamespace("MAPI").GetDefaultFolder( olFolderOutbox).Items
For Each objItem In Items
Set Recips = objItem.Recipients
For Each Recip In Recips

If Recip.Address = " Then
objItem.Attachments.Add ("C:\copper\115.xls")
objItem.Send

ElseIf Recip.Address = " Then
objItem.Attachments.Add ("C:\copper\116.xls")
objItem.Send

ElseIf Recip.Address = " Then
objItem.Attachments.Add ("C:\copper\118.xls")
objItem.Send


End If
Next
Next
End Sub

When I run code in Outlook on non Exchange Server compute all is fine.

When I run code in Outlook that is networked with Excange Server, it doen't.
Upon debug the Reciepient.Address value is something like
"/o=Company/ou/SUBCOMPANY/cn=Main Office=JonesB" certainly not .
When I type the value as "o/=Company..." in the If test in my code, it still
doen't match the actual emails and thus nothing gets attached.

One other fact..the email is generated from Word Mail Merge. I can see the
values of EMail used by Word which is consistent with the data above
"o/Company..." but in Step Mode of Outlook Recip.Address appears as CAPS but
it is not that way in the Word Merge Data Table.

Any ideas of what my code needs to be to match the EMail address as seen in
the Outbox by my code. ie Recip.Address = "/o=Company/ou/SUBCOMPANY/cn=Main
Office=JonesB" doen't work even though this is the value shown in Step Mode.

Thanks very much,

Joel
 




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
Update address book automatically FROM EXCHANGE SERVER gchandrujs via OfficeKB.com Outlook - Using Contacts 2 November 10th 06 03:50 AM
Outlook Express send error 554 'recipient rejected by server' Maddydoggy Outlook Express 9 November 4th 06 04:03 PM
Expired messages are deleted by the recipient OL or Exchange? Lucas Campos Outlook - General Queries 4 October 30th 06 08:43 PM
Importing External Email Address To Exchange Server Lisa AGA Outlook - Using Contacts 1 October 24th 06 12:00 AM
!!HELP!!! Cannot connect to Exchange Server from a RDP, ICA session or server local machine AllenM Outlook - General Queries 0 May 11th 06 11:14 PM


All times are GMT +1. The time now is 08:59 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.