Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / October 2004

Tip: Looking for answers? Try searching our database.

Added recipient does not receive mail - Outlook 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sharad Naik - 31 Oct 2004 07:40 GMT
Hello,

I made a simple macro to add recipient in Bcc field, as under:
This was working perfect with Outlook 2000. But the same code
is no more working with Outlook 2003.

The code is as under:-

If InStr(1, ActiveInspector.CurrentItem.BCC, "all@pfeiffer-vacuum.co.in",
vbTextCompare) > 0 Then
   Exit Sub
Else
   j = MsgBox("'Bcc:' field does not contain 'All PVIN'!!  Add 'All PVIN'
to Bcc Field?", vbYesNoCancel, "PV IN Mail Security & AntiSpam Programs:")
   If j = vbYes Then
   Set l = ActiveInspector.CurrentItem.Recipients.Add("All PVIN
(all@pfeiffer-vacuum.co.in)")
       l.Type = olBCC
   End If
   If j = vbNo Then
       Exit Sub
   End If
   If j = vbCancel Then
       Cancel = True
   End If
End If

The code does add the recipient in the Bcc field. When I check the msg in
outbox or in Sent Items,
it shows the recipient was added in the Bcc field. However the recipient
address is not hyperlinked in the
Bcc field, like it is for the manually added recipients.

Any suggestions would be greatly appreciated.

Sharad
Michael Bauer - 31 Oct 2004 10:18 GMT
Hi Sharad,

>     Set l = ActiveInspector.CurrentItem.Recipients.Add("All PVIN
> (adress@domain.com)")

I know this syntax:

... .add("<name> address@domain.com")

After adding a recipient you can check if it can be resolved.

Signature

Viele Grüße
Michael Bauer

> Hello,
>
[quoted text clipped - 32 lines]
>
> Sharad
Sharad Naik - 31 Oct 2004 16:08 GMT
Thanks Michael, but even that did not solve the problem.

But I could solve the problem finally. I found .Resolove method in the help,
and after  'l.Type = olBCC' line in my code I just added,  'l.resolve' and
now it works perfectly.

Sharad
> Hi Sharad,
>
[quoted text clipped - 48 lines]
>>
>> Sharad
Michael Bauer - 31 Oct 2004 16:29 GMT
> and after  'l.Type = olBCC' line in my code I just added,  'l.resolve' and
> now it works perfectly.

That was my intention :-)

Signature

Viele Grüße
Michael Bauer

> Thanks Michael, but even that did not solve the problem.
>
[quoted text clipped - 53 lines]
> >>
> >> Sharad
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.