Outlook 2007 Links.Item - what is returned?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Outlook 2003 I my code included accessing data in a contact item by
passing a an item from the Links collection. The code was ,object =
<object>.Links.Item(1).Item. That worked fine for months.
On upgrading to 2007 B2TR I had to remove the .Item bit at the end. The
code ran OK. Suddenly accessing the object returned (which should be an
olContact results in an eroor - the object does not support that method or
property. The debuffer declares the object to be of class "Link".
Why has the Links.Item(index) stopped returning an object of class olContact?
 
Links.Item(index) will return a Link object. Link.Item will return either a ContactItem or Nothing. Your code needs to be able to handle both possible outcomes.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top