Posts 1 - 10 of 14
First | Prev. | 1 2 | Next | Last
|
|
d henderson
Posts: 39
Joined: 2006-03-06
|
I creating an application where I need to differentiate in my ItemSend()handler whether the event is due to a Outlook meeting being updated or cancelled or created. I get the ItemSend event just fine. Can you give pointers on how to achieve this?
My ItemSend Sub decl looks like:
Private Sub adxOutlookEvents_ItemSend(ByVal sender As Object, ByVal e As AddinExpress.MSO.ADXOlItemSendEventArgs) Handles adxOutlookEvents.ItemSend )
Thanks - Don
|
|
Posted 15 May, 2006 16:26:09
|
|
Top
|
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Don.
Try the code below:
Private Sub adxOutlookEvents_ItemSend(ByVal sender As Object, ByVal e As AddinExpress.MSO.ADXOlItemSendEventArgs) Handles adxOutlookEvents.ItemSend
Dim meetingItem As Outlook._MeetingItem = Nothing
If TypeOf e.Item Is Outlook._MeetingItem Then
meetingItem = CType(e.Item, Outlook._MeetingItem)
End If
End Sub |
|
Posted 16 May, 2006 09:28:10
|
|
Top
|
|
d henderson
Posts: 39
Joined: 2006-03-06
|
Thanks for the response.
Ok. Let me elaborate on the problem... I can to detect the fact that the ItemSend event was caused by a meetingItem.
Now I need to determine what meetingItem *action* just took place
e.g. was it a meeting - create or update or delete?
Any Idea how to figure this out?
Here's a code frag for what I know thus far and what I need to be able to do.
Thanks, Don
Private Sub adxOutlookEvents_ItemSend(ByVal sender As Object, ByVal e As AddinExpress.MSO.ADXOlItemSendEventArgs) Handles adxOutlookEvents.ItemSend
Dim meetingItem As Outlook._MeetingItem = Nothing
If TypeOf e.Item Is Outlook._MeetingItem Then
meetingItem = CType(e.Item, Outlook._MeetingItem)
.
. 'Here I need to determine what meetingItem action
. ' e.g.(meeting *create or *update or *delete)
. 'caused the ItemSend event
.
EndIf |
|
Posted 16 May, 2006 11:09:55
|
|
Top
|
|
d henderson
Posts: 39
Joined: 2006-03-06
|
*I am sending again because I accidentally sent a partial posting last time. See below.
............................
Thanks for the response.
Ok. Let me elaborate on the problem... I can to detect the fact that the ItemSend event was caused by a meetingItem.
Now I need to determine what meetingItem *action* just took place
e.g. was it a meeting - create or update or delete?
Any Idea how to figure this out?
Here's a code frag for what I know thus far and what I need to be able to do.
Thanks, Don
Private Sub adxOutlookEvents_ItemSend(ByVal sender As Object, ByVal e As AddinExpress.MSO.ADXOlItemSendEventArgs) Handles adxOutlookEvents.ItemSend
Dim meetingItem As Outlook._MeetingItem = Nothing
If TypeOf e.Item Is Outlook._MeetingItem Then
meetingItem = CType(e.Item, Outlook._MeetingItem)
.
. 'Here I need to determine what meetingItem action
. ' e.g.(meeting *create or *update or *delete)
. 'caused the ItemSend event
.
EndIf |
|
Posted 17 May, 2006 07:47:01
|
|
Top
|
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Don.
You can use the OutlookItemEventsClass to handle "create", "update" or "delete" actions (the 'Outlook Item Events Class' wizard in the 'Add New Items' dialog).
When
1. a new item is created the ProcessOpen method is only being called.
2. an item is updated the ProcessWrite method is called.
3. an existing item is opened the ProcessOpen and ProcessRead method are
called.
4. an item is sent the ProcessSend method is called.
Please see our OutlookItemEvents example from the ADX installation package. |
|
Posted 17 May, 2006 08:14:14
|
|
Top
|
|
d henderson
Posts: 39
Joined: 2006-03-06
|
Could you provide a VB.Net version of the OutlookItemEvents example?
Please say yes... :)
Thanks - Don |
|
Posted 17 May, 2006 10:48:13
|
|
Top
|
|
d henderson
Posts: 39
Joined: 2006-03-06
|
To expand...
FYI - I compiled and ran the C# 'OutlookItemEvents' example ok.
I need to do this in VB.NET.
So,
I managed to add the "Outlook Item events class" to my VB project.
This created a module: OutlookItemEventsClass1.vb containing a set of Outlook event handlers. Looked simple enough. I reregistered the ADX, and ran Outlook -- playing with the meeting inspector, etc, expecting a messagebox to display from the handlers (per my code below).
I find nothing happens when an Item is SENT,CLOSED, etc. Is there something else I need to do for these handlers to execute?
Public Overrides Sub ProcessClose(ByVal E As AddinExpress.MSO.ADXCancelEventArgs)
MsgBox("ProcessClose...")
End Sub
Public Overrides Sub ProcessSend(ByVal E As AddinExpress.MSO.ADXCancelEventArgs)
MsgBox("ProcessSend..")
End Sub
Public Overrides Sub ProcessWrite(ByVal E As AddinExpress.MSO.ADXCancelEventArgs)
MsgBox("ProcessWrite..")
End Sub
Thanks - Don
|
|
Posted 17 May, 2006 11:32:56
|
|
Top
|
|
d henderson
Posts: 39
Joined: 2006-03-06
|
Could you please supply a simple VB.NET example so that I can see how to set up things to use the OutlookItemEventsClass ?
Thanks - Don |
|
Posted 18 May, 2006 09:02:09
|
|
Top
|
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Don.
Ok, I will rewrite the OutlookItemEvents example in VB.NET and will give you a link. |
|
Posted 18 May, 2006 09:29:46
|
|
Top
|
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
|
Posted 18 May, 2006 12:23:03
|
|
Top
|
|
Posts 1 - 10 of 14
First | Prev. | 1 2 | Next | Last
|