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

Outlook 2007 Links.Item - what is returned?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 24th 06, 12:17 PM posted to microsoft.public.outlook.program_vba
David Hyde
external usenet poster
 
Posts: 5
Default Outlook 2007 Links.Item - what is returned?

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?
  #2  
Old October 24th 06, 02:26 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook 2007 Links.Item - what is returned?

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"David Hyde" wrote in message ...
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?

 




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
Outlook 2007 beta2 issue.(Folder URL links) T-rev Outlook - General Queries 1 September 19th 06 03:31 PM
How to change an item from a recurring Appointment item to an exception from VB code? Dikbill Outlook and VBA 2 July 13th 06 09:45 AM
Saving exception item in recurring appointment item fails Dikbill Outlook - Calandaring 0 July 11th 06 03:01 PM
Links NG in newsgroups; e-mail links work OK (More) POP Outlook Express 1 June 20th 06 12:37 PM
e mails returned 501 syntax error in parameters.outlook please res krisa and mike Outlook - Installation 1 January 10th 06 06:49 PM


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