![]() |
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 |
#11
|
|||
|
|||
![]()
Ken,
First off thanks for the suggestion, I took your first approach and this worked well. However, we seem to have hit an issue with send event. For some users, meeting requests are sent twice. It is sent once when the meeting is set up and the send button is clicked and the meeting is 'qualified' (our methodology), then when users close and reopen outlook, the request is sent again. I am trapping the event as follows: _apptEvents.Send += new Microsoft.Office.Interop.Outlook.ItemEvents_SendEv entHandler(_apptEvents_Send); which is fired off during the FormRegionShowing event. In the _apptEvents_Send method I just do some checking to see if the meeting has been 'qualified' and cancel respectively. private voide _apptEvents_Send(ref bool Cancel) { if(!Qualified) { messagebox.show("Meeting not qualified"); Cancel = true; return; } } Any ideas? "Ken Slovak - [MVP - Outlook]" wrote: What you're missing is what you're going to run into with methods/events that overload the same keyword in all managed code. In this case AppointmentItem doesn't directly expose the Send event since it uses the same keyword as the Send method. There are a couple of ways to do what you need to do: 1. Declare at class level an ItemEvents_Event object, say _apptEvents: private Outlook.ItemEvents_Event _apptEvents; Then instantiate the event handler so: _apptEvents = (Outlook.ItemEvents_Event)_appt; _apptEvents.Send += new Outlook.ItemEvents_SendEventHandler(myHandler); 2. An alternative is to use AppointmentItemClass: private Outlook.AppointmentItemClass _itemClass; // class level Then instantiate as follows: _itemClass = (Outlook.AppointmentItemClass) _appt; _itemClass.ItemEvents_10_Event_Send += etc. -- 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 "BigDubb" wrote in message ... I am not seeing an Appointment.Send Event, rather an Send Method. When trying to make the event handler for the send method I get the following error "Cannot assign to 'Send' because it is a 'method group' " Here is the syntax AppointmentItem _appt = this.OutlookItem as Outlook.AppointmentItem; if(_appt == null) return; _appt.Send += new Outlook.ApplicationEvents_11_ItemSendEventHandler( Application_ItemSend); What am I missing? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail stuck in outbox, can't delete,won't send, retards send/rec. | Great Golfer | Outlook - General Queries | 2 | June 10th 08 06:06 PM |
How do I send an email from office? I cant find a send button. | jasonrock | Outlook - General Queries | 2 | November 25th 07 05:52 PM |
Some items can't be send in outlook 2003. Even after repeatly clicking the send button. | baarts | Outlook - General Queries | 1 | August 9th 06 03:52 PM |
OE6 is not launching from within IE6 on New Message, Send a Link, Send Page | Edward | Outlook Express | 6 | March 12th 06 03:14 AM |
File send send Link by Email problems in IE after Thunderbird Install | Woody | Outlook - General Queries | 0 | January 8th 06 01:26 AM |