![]() |
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 setting a custom property via a button click event, which I try to read
in Item_send. This works for fine mail items (IPM.Note). But it does NOT work for MeetingRequests. The property gets set successfully by SetProperty method (it is visible via OutlookSpy). But it cannot be found when trying to read via "GetProperty" method from within Item_Send event. Any ideas would be appreciated. TIA. Here is the relavent part of the code: ---------------------- OnbtnMyButton(ByVal control As Office.IRibbonControl, ByVal isPressed As Boolean) Dim objApp As Microsoft.Office.Interop.Outlook.Application Dim objInsp As Microsoft.Office.Interop.Outlook.Inspector Dim objItem As Object Dim objPA As Microsoft.Office.Interop.Outlook.PropertyAccessor Dim strPropSchema As String = "http://schemas.microsoft.com/mapi/string/{2516bae8-2064-4d58-9dc3-6cdd1058f8d1}/ButtonState" objApp = Globals.ThisAddIn.Application objInsp = objApp.ActiveInspector objItem = objInsp.CurrentItem objPA = objItem.PropertyAccessor If isPressed Then objPA.SetProperty(strPropSchema, "Pressed") Else objPA.SetProperty(strPropSchema, "UnPressed") End If objPA = Nothing objItem = Nothing objInsp = Nothing objApp = Nothing End Sub Private Sub oL_ItemSend(ByVal Item As Object, ByRef Cancel As Boolean) Handles oL.ItemSend Dim objPA As Microsoft.Office.Interop.Outlook.PropertyAccessor Dim strPropSchema As String = "http://schemas.microsoft.com/mapi/string/{2516bae8-2064-4d58-9dc3-6cdd1058f8d1}/ButtonState" Dim strButtonState As String objPA = Item.PropertyAccessor '**** The following line does not work for MeetingRequests '**** (property cannot be found)**** strButtonState = objPA.GetProperty(strPropSchema) If strButtonState = "Pressed" Then ' Do my stuff End If objPA= nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
mark property read receipt = .t. | JimSturtz | Outlook - Using Contacts | 0 | March 17th 08 07:04 PM |
Ability to select one of several meetings in a single meetingrequest? | [email protected] | Outlook - Calandaring | 2 | January 31st 08 02:29 PM |
Meetingrequest not shown in calendar untill request has been read | shellyspradley | Outlook - Calandaring | 1 | May 31st 07 02:50 AM |
PropertyAccessor.GetProperty | Peter Marchert | Outlook and VBA | 4 | January 10th 07 09:14 PM |
Change Read Only Property on Forward | [email protected] | Outlook - Using Forms | 1 | July 19th 06 10:39 PM |