.net - VSTO - Outlook event handler in C# -


I need to display a custom form instead of the default inspector form for a fixed appointment item. I want to do it in C #

There is a nice tutorial but it is using VB, and I want to use C #. So I have translated the code to C # and I have a problem where I have to override the event handler for open for appointments (which is mcai Code>). In the above tute, they say to do the following in VB:

  Private sub tyai_Open (cancel byRep Boolean) tyai handles. Open Cancel = True and All  

Who is translated as:

  Private Zero mcAI_Open (Cancel Out Arrow) {Cancel = truth; }  

(Please note that I have tried it with and without any outside and riff parameters, and without Is also the first even)

However, we need to register that this is with the incident, so I have put this code:

  mcAI.Open + = New Microsoft .Office.Interop.Outlook.ItemEvents_10_OpenEventHandler (mcAI_Open);  

But I can not compile it as I get the error:

A surcharge match account for 'MCAI Open' Any ideas about how to register my work for Microsoft.Office Interop.Outlook.ItemEvents_10_OpenEventHandler '

open AppointmentItem ? Thanks in advance.

(BTW suggests my code work and still I'm still stuck.)

Theoretically, this should work:

  Private Zero mcAI_Open (ref bool Cancel) {Cancel = true; }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -