![]() |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
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 |
#5
|
|||
|
|||
![]()
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 |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |