outlook Add-In problem accessing shared calendar second time

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

Guest

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
 
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.
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top