Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2005, 09:03 AM
Balamurugan
Guest
 
Posts: n/a
Default outlook Add-In problem accessing shared calendar second tim

Hi
I had developed an Add - In for outlook 2003. It works fine while accessing
the inbox folder. But when I tried to access the mail item stored in the


calendar of another user, it works fine for the first time. When I opened the
mail Item in the calendar for the second time it says "The operation Failed"
error message.

I think the error is generated in the line "Inspector.CurrentItem" when the
application tries to get the reference of the active inspector

Regards
R.Balamurugan
Reply With Quote
  #2  
Old 02-07-2005, 09:41 AM
Ken Slovak
Guest
 
Posts: n/a
Default Re: outlook Add-In problem accessing shared calendar second

You would have to show more of your code for anyone to see what you are
doing and how.

And you'd be best off posting this in a programming newsgroup, such as
microsoft.public.outlook.program_vba.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
Reply With Quote
  #3  
Old 02-07-2005, 09:42 AM
Balamurugan
Guest
 
Posts: n/a
Default Re: outlook Add-In problem accessing shared calendar second

Hi

Here is the code snippet

Private Sub m_olInspectors_NewInspector(ByVal Inspector As Outlook.Inspector)
Try

m_olInspector = CType(Inspector, Outlook.InspectorClass)
AddHandler m_olInspector.InspectorEvents_Event_Close, AddressOf
m_olInspector_Close

If TypeOf Inspector.CurrentItem Is Outlook.MailItem Then
m_olMailItem = CType(Inspector.CurrentItem,
Outlook.MailItemClass)
End If
Catch ex As SystemException

End Try
End Sub

The line "If TypeOf Inspector.CurrentItem Is Outlook.MailItem Then" is
giving problem when I used the shared calendar to open the mail item second
time. If I comment out the IfLoop and its contents it is working fine.

Regards
R.Balamurugan
Reply With Quote
  #4  
Old 02-07-2005, 05:17 PM
Ken Slovak
Guest
 
Posts: n/a
Default Re: outlook Add-In problem accessing shared calendar second

Well, I can't answer for the oddities of using .NET coding with Outlook
other than to say that a lot of odd problems crop up. Why not see if
Item.Class does any better for you and make sure you are keeping alive any
object references you will need later on.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
Reply With Quote
  #5  
Old 03-04-2006, 09:48 PM
Hydrogen Hydrogen is offline
Novice
 
Join Date: Mar 2006
Posts: 2
Hydrogen
Default MailItem Inspectors cache CommandBars but Calendar do not?

Hi Everyone,

Using: VS 2005 Tools for Office - code in C#

It seems that when we create Temporary CommandBars and related buttons to MailItem Inspectors, on subsequent NewInspector events (and thus Inspector windows containing MailItems), the Temporary CommandBars remain and we don't have to recreate them.

Oddly, this is NOT the case with Calendar items. If we open a new Calendar Appointment (or any other appointment for that matter), the Temporarily created CommandBars are no longer there, yet our class-scoped variable containing a reference to the previous Calendar's Inspector STILL has a VALID reference to the previous Inspector?

Could someone please explain the difference in function between a MailItem and Calendar Item containing folder??

Regards,
-Darius
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook Add-In  problem accessing shared calendar second tim Accessing oulook lozababi Outlook 1 05-08-2009 06:13 AM
How to save list of shared links on Outlook? sus Outlook 0 08-26-2008 08:46 AM
Outlook 2003 shared contacts lists problem mlhoward Outlook 0 06-25-2008 06:09 AM
Needs Help on accessing mailitems from C#. Plz. welcome2devilsworld Outlook 0 04-30-2007 09:01 AM
Problem restoring contacts/calendar lbauge Outlook 0 05-02-2006 06:21 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 05:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft