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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

InvalidCastException after installing VS 2005



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 29th 06, 02:17 PM posted to microsoft.public.outlook.program_addins
Frank Sharp
external usenet poster
 
Posts: 2
Default InvalidCastException after installing VS 2005

Running XP OL2003, VS 2002 pro, I wrote an Outlook Addin.. worked fine.
Did something like: process AppointmentItems based on a Custom Form
(MessageClass= IPM.Appointment.Reservation) in an Outlook calendar folder
named "Reservations" like:
Dim objAppts As Items
Dim objAppt As AppointmentItem
objNS = objApplication.GetNamespace("MAPI")
objAppts =
objNS.GetDefaultFolder(OlDefaultFolders.olFolderCa lendar).Folders.Item("Reservations").Items
objAppts.IncludeRecurrences = True
objAppt = objAppts.Item(1)

(just an example.. I know how to write AddIns..everything worked fine..)

Then: Installed VS 2005 Pro. From this moment on I got an
InvalidCastException at this line:
objAppt = objAppts.Item(1)
(still running this AddIn under VS 2002.. did nothing with VS 2005, just
installed it)

Wrote a Win.exe to test this; found out: after installing VS2005 I get the
InvalidCastException in VS2002 if the messageclass is not exactly
"IPM.Appointment"; before it also worked with "IPM.Appointment.Reservation".
To prevent some answers that won't help:
This AddIn uses Framework 1.1:
'DefaultDomain': 'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll'
geladen, keine Symbole geladen.
'Domain2': 'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll'
geladen, keine Symbole geladen.
...and so on..(german version..)
TypeName(objAppts.Item(1)) is "AppointmentItem" (no distribution list in
this folder..just AppointmentItems with messageclass
IPM.Appointment.Reservation..)

What I tried so far: uninstalled VS 2005, uninstalled Framework 2.0.. no
luck.. same result..
Uninstalled Framework 1.1, 1.0; reinstalled Framework 1.0, 1.1..Setup repair
of VS 2002.. no luck..
Unchecked, rechecked the .NET Programmability Support for Outlook in Office
Setup, tried any combination with installing uninstalling redistributable
PIA's.. and so on..

Please help.
Thank you, Frank


Ads
  #2  
Old April 29th 06, 11:45 PM posted to microsoft.public.outlook.program_addins
Frank Sharp
external usenet poster
 
Posts: 2
Default InvalidCastException after installing VS 2005

Solution. or better.. Bug report.. postet in
microsoft.public.outlook.interop with the same subject.
It's actually not just an AddIn problem..

Regards, Frank

"Frank Sharp" schrieb im Newsbeitrag
...
Running XP OL2003, VS 2002 pro, I wrote an Outlook Addin.. worked fine.
Did something like: process AppointmentItems based on a Custom Form
(MessageClass= IPM.Appointment.Reservation) in an Outlook calendar folder
named "Reservations" like:
Dim objAppts As Items
Dim objAppt As AppointmentItem
objNS = objApplication.GetNamespace("MAPI")
objAppts =
objNS.GetDefaultFolder(OlDefaultFolders.olFolderCa lendar).Folders.Item("Reservations").Items
objAppts.IncludeRecurrences = True
objAppt = objAppts.Item(1)

(just an example.. I know how to write AddIns..everything worked fine..)

Then: Installed VS 2005 Pro. From this moment on I got an
InvalidCastException at this line:
objAppt = objAppts.Item(1)
(still running this AddIn under VS 2002.. did nothing with VS 2005, just
installed it)

Wrote a Win.exe to test this; found out: after installing VS2005 I get the
InvalidCastException in VS2002 if the messageclass is not exactly
"IPM.Appointment"; before it also worked with
"IPM.Appointment.Reservation".
To prevent some answers that won't help:
This AddIn uses Framework 1.1:
'DefaultDomain':
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll' geladen, keine
Symbole geladen.
'Domain2': 'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll'
geladen, keine Symbole geladen.
..and so on..(german version..)
TypeName(objAppts.Item(1)) is "AppointmentItem" (no distribution list in
this folder..just AppointmentItems with messageclass
IPM.Appointment.Reservation..)

What I tried so far: uninstalled VS 2005, uninstalled Framework 2.0.. no
luck.. same result..
Uninstalled Framework 1.1, 1.0; reinstalled Framework 1.0, 1.1..Setup
repair of VS 2002.. no luck..
Unchecked, rechecked the .NET Programmability Support for Outlook in
Office Setup, tried any combination with installing uninstalling
redistributable PIA's.. and so on..

Please help.
Thank you, Frank



 




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
ReportIcon in Visual Studio 2005 rfw68 Outlook - Using Forms 0 April 27th 06 05:39 PM
Importing ACT 2005 Version 7 Mark Jackson Outlook - Using Contacts 0 April 25th 06 01:47 PM
holidays do not go beyond dec 31, 2005 tlh7805 Outlook - Calandaring 2 April 25th 06 12:45 PM
How do I add holiday events beyond Dec. 31, 2005? Doug Slattery Outlook - Calandaring 2 April 14th 06 01:25 AM
how do i add holidays in Outlook beyond 2005 ? Larry Outlook - Calandaring 1 January 17th 06 12:18 PM


All times are GMT +1. The time now is 12:07 PM.


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.