View Single Post
  #9  
Old March 24th 10, 01:29 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Iterating a Contacts folder for Outlook 2003 and 2007 in C#

In addition to what Andrei said if you updated your Add-In Express at any
point there might be references pointing to different paths or file names
that might need to be adjusted for a different version. For example in
loading a project created with an earlier version in the latest version of
Add-In Express I always have to adjust some references.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrei Smolin [Add-in Express]"
wrote in message ...[i]
Hi Bob,

Using Outlook;


Add-in Express provides version-neutral interops. In your case the
interops are for Outlook 2000 and Office 2000 (common tools). The
namespaces contained in these interops are Outlook and Office,
respectively.

Using Outlook1 = Microsoft.Office.Interop.Outlook;


This statement refers to PIA for some Outlook version; it may be Outlook
2002, 2003 or 2007.

c = (Outlook.ContactItem)items;


Yes, this is a kind of restriction in version-neutral interops. Try c =
items.Item(i) as Outlook.ContactItem;

Also, you may want to read my post at the Add-in Express blog on how to
support several Outlook versions in a COM add-in using different interop
versions via early and late binding, see
http://www.add-in-express.com/creati...-late-binding/.

I am a rare visitor here. If you have any questions you can quickly reach
me on our forums, see http://www.add-in-express.com/forum/index.php.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
www.add-in-express.com


Ads