VB.NET and Outlook 2000 - adding members to Recipients collection hangs

  • Thread starter Elliot M. Rodriguez
  • Start date
E

Elliot M. Rodriguez

I'm attempting to use automation with Outlook 2000 (version 9 object
library) via VB.Net.

In trying to add receipients to my MailItem's Recipients collection, my code
simply hangs. It does not throw an error. I am able to set other properties
of the object prior to the call, and I am lost as to why this one in
particular just fails.

My project contains the proper references to Interop.Outlook . Can anyone
please help?

objOutlook = New Outlook.Application

objOutlook.Session.Logon(Me.ProfileName)

objMailItem = objOutlook.CreateItem(Outlook.OlItemType.olMailItem)

objAttachment = objMailItem.Attachments.Add(filepath)

objRecip = objMailItem.Recipients.Add(Recipient) 'hangs here.

objRecip.Type = 1



thanks in advance for your help.
 
E

Elliot M. Rodriguez

update.

I can execute code fine in a console app,. but in a web app the code hangs
on the recipients call.

thanks for any help
 
S

Sue Mosher [MVP]

How are you setting the value for Recipient?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top