![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am creating an addin using C# and want to convert existing appointment item
to use my custom form once the button in the ribbon is clicked. (the active inspector) I have tried different solutions but not fully succeeded a) Changing the message class and then call save . This is not working form still pointin to IPM.Appointment b) Changing the Message Class then close the item and gets the item from the seesion by its entryID. This is not working as well and when I opened the appointment then it still using the IPM.Appointment class instead of my custom class. Although when I am debugging the item its message clase is changed to custom message class but on calendar display its still using the IPM.Appointment. c) Deleting the current Item and creating the New Item using Items.Add method and specifying the custom message class and then copying the old Appointment Item to the new Item. This is working in case of single items but in case of Recurring Items this technique fails and also I will loose tracking and other information. This is only happening Outlook 2007. it is only happening on Appointment Items. it seems that Outlook 2007 is not releasing some object to refresh the item to use the new message class. We have been using DC.collect, DC.WaitForPendingFinalizers and GC.CollectObject etc etc buyt top no avial. Has any body got a reliable fool proof way of changing the message class of the item whilst the item is open and having the inspector load the item inside the custom form Please let me know. Many thanks |
Ads |
#2
|
|||
|
|||
![]()
Outlook really likes to hold on to the appointment items...
In case of (c), why not work with the master appointment (returns by AppointmentItem.Parent) if AppointmentItem.RecurrenceState = olApptOccurrence/olApptException? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "OutlookWiz" wrote in message ... I am creating an addin using C# and want to convert existing appointment item to use my custom form once the button in the ribbon is clicked. (the active inspector) I have tried different solutions but not fully succeeded a) Changing the message class and then call save . This is not working form still pointin to IPM.Appointment b) Changing the Message Class then close the item and gets the item from the seesion by its entryID. This is not working as well and when I opened the appointment then it still using the IPM.Appointment class instead of my custom class. Although when I am debugging the item its message clase is changed to custom message class but on calendar display its still using the IPM.Appointment. c) Deleting the current Item and creating the New Item using Items.Add method and specifying the custom message class and then copying the old Appointment Item to the new Item. This is working in case of single items but in case of Recurring Items this technique fails and also I will loose tracking and other information. This is only happening Outlook 2007. it is only happening on Appointment Items. it seems that Outlook 2007 is not releasing some object to refresh the item to use the new message class. We have been using DC.collect, DC.WaitForPendingFinalizers and GC.CollectObject etc etc buyt top no avial. Has any body got a reliable fool proof way of changing the message class of the item whilst the item is open and having the inspector load the item inside the custom form Please let me know. Many thanks |
#3
|
|||
|
|||
![]()
I know it does Dmitry !
Is this a bug with Outlook 2007. Sue Certainly thought it is.! - can anybody from MS shed any light to why it seems that sometimes only a restart of outlook "unlocks" the appointment item - or even better a viable work-around. ! Thanks for the suggestion - we do that - however we loose tracking information from the item. hmm - just thought Is there a way to copy an item (the whole object & all...) and then spoof its entry ID. You see the deperate measures that we are willing to take to make this work. "Dmitry Streblechenko" wrote: Outlook really likes to hold on to the appointment items... In case of (c), why not work with the master appointment (returns by AppointmentItem.Parent) if AppointmentItem.RecurrenceState = olApptOccurrence/olApptException? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "OutlookWiz" wrote in message ... I am creating an addin using C# and want to convert existing appointment item to use my custom form once the button in the ribbon is clicked. (the active inspector) I have tried different solutions but not fully succeeded a) Changing the message class and then call save . This is not working form still pointin to IPM.Appointment b) Changing the Message Class then close the item and gets the item from the seesion by its entryID. This is not working as well and when I opened the appointment then it still using the IPM.Appointment class instead of my custom class. Although when I am debugging the item its message clase is changed to custom message class but on calendar display its still using the IPM.Appointment. c) Deleting the current Item and creating the New Item using Items.Add method and specifying the custom message class and then copying the old Appointment Item to the new Item. This is working in case of single items but in case of Recurring Items this technique fails and also I will loose tracking and other information. This is only happening Outlook 2007. it is only happening on Appointment Items. it seems that Outlook 2007 is not releasing some object to refresh the item to use the new message class. We have been using DC.collect, DC.WaitForPendingFinalizers and GC.CollectObject etc etc buyt top no avial. Has any body got a reliable fool proof way of changing the message class of the item whilst the item is open and having the inspector load the item inside the custom form Please let me know. Many thanks |
#4
|
|||
|
|||
![]()
Have you been calling Marshal.ReleaseComObject() on the appointments and
then setting them to null before any calls to GC.Collect() and WaitForPendingFinalizers()? -- 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 "OutlookWiz" wrote in message ... I know it does Dmitry ! Is this a bug with Outlook 2007. Sue Certainly thought it is.! - can anybody from MS shed any light to why it seems that sometimes only a restart of outlook "unlocks" the appointment item - or even better a viable work-around. ! Thanks for the suggestion - we do that - however we loose tracking information from the item. hmm - just thought Is there a way to copy an item (the whole object & all...) and then spoof its entry ID. You see the deperate measures that we are willing to take to make this work. |
#5
|
|||
|
|||
![]()
Yes
I have since found the answer. You need to also place Application.DoEvents before re-opening the form (it seems that Outlook likes to take its time doing stuff), and the one that I nearly shot myself - the preview pae. If the preview pane is visible the item is effectively locked no matter what you do (nice one MS). So remove it before doing the operation and then put it back on "Ken Slovak - [MVP - Outlook]" wrote: Have you been calling Marshal.ReleaseComObject() on the appointments and then setting them to null before any calls to GC.Collect() and WaitForPendingFinalizers()? -- 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 "OutlookWiz" wrote in message ... I know it does Dmitry ! Is this a bug with Outlook 2007. Sue Certainly thought it is.! - can anybody from MS shed any light to why it seems that sometimes only a restart of outlook "unlocks" the appointment item - or even better a viable work-around. ! Thanks for the suggestion - we do that - however we loose tracking information from the item. hmm - just thought Is there a way to copy an item (the whole object & all...) and then spoof its entry ID. You see the deperate measures that we are willing to take to make this work. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MessageClass and Custom Outlook Form issue | IceKettle | Add-ins for Outlook | 2 | March 10th 08 10:08 AM |
MessageClass and Custom Outlook Form issue | IceKettle | Outlook - General Queries | 0 | March 7th 08 03:12 AM |
newmailex - messageclass change not displayed message opened | spareway | Add-ins for Outlook | 4 | January 3rd 07 11:12 PM |
MessageClass Not Preserved on Receipt | Pete Loveall | Outlook - Using Forms | 11 | September 21st 06 10:28 PM |
MessageClass Property of a Post | Geoff | Outlook and VBA | 13 | June 27th 06 08:49 AM |