Detecting the send event in Outlook addin

I'm trying to write an Outlook AddIn app in C# using Visual Studio 2012.  I need to detect when the send button is clicked in a current email.  I'll want to perform some actions after the send button has been clicked.   
I assume an event handler needs to be created, but I'm not sure where- at the item level, or application level.  I created a mail item object with Outlook.MailItem publicItem = (Outlook.MailItem).this.OutlookItem.  It seems like I should be detecting
publicItem.send but I'm not clear on how and where to use event handlers in this case.  
I added a checkbox, and Visual Studio created publicCheckBox_Changed(object sender, EventArgs e) for me.  To check if the box was checked, I used  'if(publicCheckBox.checked) { do stuff }.   Is detecting the send event similar? 
I'm new to c# and Outlook Addins, and fairly new to coding.  
Thanks for your help. 
Wayne

Hello Wayne,
In the check box Clicked event you can add a user property to the MailItem (see UserProperties.Add). Then in the ItemSend event ( see the Application class) handler you can check out the property value - whether it is set or not. Be aware, the Cancel parameter
passed to ItemSend event handler allows to prevent the item from sending.

Similar Messages

  • Using javascript to detect the onclick event over a datatable row

    Hi all,
    I'm working with JSF 1.2 R.I. and I would like to add some javascript to my datatable to be able to control the onclick event on a row.
    At the moment I have just added a checkbox to be able to know which row the user wants to select but I'm not satisfied with this solution.
    <h:dataTable
    value="#{person_iupopulations_Observation.customer}" var="customer"
    rowClasses="evenRow,oddRow"
    cellspacing="0">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Select" />
    </f:facet>
    <h:selectBooleanCheckbox value="" onclick="getRow(this)">
    </h:selectBooleanCheckbox>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name" />
    </f:facet>
    <h:outputText value="#{customer.Name}"></h:outputText>
    </h:column>
    </h:dataTable>
    What I would like to achieve is:
    When the user clicks the row (wherever, not only the checkbox) the checkbox changes to the new value depending, off course, on the user's selection.
    For this purpose I would need to add the onclick event to every row and associate it to a javascript function to update the checkbox.
    Can anybody help me please.
    I appreciate any suggestion.
    Thanks in advance!

    I am looking for answers on how to use javascript to detect the onclick event over a datatable row . I have a selectBooleanCheckBox in one of the columns in the every row in the table. On click of the checkbox in any row of the table, I want to get some values from the selected row and also verify that the rest of the checkboxes in all the other columns are unchecked. I want to do this using javascript. If any of you have answers, please repsond. Thanks.

  • How to resolve the IP Address in Outlook addin?

    Currently, I am using an outlook addin, which receives the mail and parses the body of the mail,and doing some database operations.
    The thing is that, using the CC email address, it assigns the task through database. But, if user uses Display Name of the CC address in their mail, Outlook addin fails to fetch the address corresponding to the CC address. How to get the CC address (Resolve
    mail address) of the Display Name used in the remote machine where the Outlook Addin is running. 

    You need to use the
    Recipients property of the MailItem class which returns a corresponding collection which
    represents all the recipients for the Outlook item. The Recipient class provides all the required properties and methods. 
    The
    Type property indicates whether a recipients belong to the CC field (TO or BCC).
    The
    Address property returns a string representing the e-mail address of the Recipient. 
    The
    Name property returns a string value that represents the display name for the object.

  • Ical - send event to outlook calendar

    I have a cold fusion event page that data comes from database it has a title – event description – start date - end date
    I need to have a button beside each event that user push that button and event goes to user's calendar in outlook. I think I can use ical but not sure how. Is there anybody can help I really appreciate it.
    Thanks,

    1. Create and save an event in Outlook.
    2. Open that event and go File > Save As to save it to your desktop in the .ics format.
    3. Open the saved file in Notepad to view the code.
    Now that you've seen what the behind-the-scenes files look like that make up the events in Outlook, you need only to use ColdFusion to create one of these files. You'll also want to place:
    <CFHEADER NAME="Content-Disposition" VALUE="inline; filename=events.vcs">
    <CFCONTENT TYPE="text/x-vcalendar">
    at the start of the CF template that creates these files.

  • Outlook 2007 Calendar Monitoring: track send event for recurring meetings

    Hi,
    I'm working on an Outlook 2007, VSTO 2010, .NET 3.5 add-in which monitors AppointmentItem objects changed on the user's calendar. Specifically I'm tracking the send event of the currently selected appointment in the calendar view. Currently my add-in is
    set to cancel the send event and call Display() on the selected appointment instead.
    I'm testing with Outlook 2007 SP3. The event handler is fired correctly for non-recurring meetings when the user changes the start or end time of the meeting and for recurring meeting occurrences / exceptions when the user changes the end time, but not when
    the user changes the start time of a recurring meeting occurrence / exception. These are the specific steps:
    Create a recurring appointment with e.g. 3 occurrences, add at least one attendee and send the invitation.
    Set the Calendar to display a Week View.
    Select the top edge of the first occurrence of the appointment created in step 1 and drag it upwards to increase the length of the appointment by half an hour.
    Release the mouse button and press enter to confirm the change.
    Answer 'Save changes and send update' in the popup.
    At this point the addin should cancel the send event and display the appointment, but actually the event handler is not called. This behavior occurs only when I change the start time of an occurrence / exception. When I change the end time the event handler
    is called correctly.
    Do you have any clue why the event handler is only called for the one change and not for the other? How could I work around this issue?

    Hi Eugene,
    Thanks for your reply. Here is my code:
    public class ExplorerMonitor {private Explorer explorer;private AppointmentItem selectedAppointment;
    public ExplorerMonitor()
    this.explorer = Globals.ThisAddIn.Application.ActiveExplorer();
    this.explorer.SelectionChange += new ExplorerEvents_10_SelectionChangeEventHandler(Explorer_SelectionChange);
    private void Explorer_SelectionChange()
    Selection selection = null;
    object selectedItem = null;
    bool eventsHookedUp = false;
    try
    // first remove the listeners from the previously selected item
    this.StopSelectedItemMonitor();
    selection = this.explorer.Selection;
    if (selection.Count == 1)
    selectedItem = selection[1];
    AppointmentItem appointment = selectedItem as AppointmentItem;
    if (appointment != null)
    this.selectedAppointment = appointment;
    ((ItemEvents_10_Event)this.selectedAppointment).Send
    += new ItemEvents_10_SendEventHandler(SelectedAppointment_Send);
    // Stop monitoring when the item is opened in an explorer window.
    this.selectedAppointment.Open
    += new ItemEvents_10_OpenEventHandler(SelectedAppointment_Open);
    eventsHookedUp = true;
    catch (System.Exception exception)
    logger.Error("Caught in Explorer_SelectionChange", exception);
    finally
    if (!eventsHookedUp)
    // only release if we didn't start monitoring it
    ComMarshaler<object>.releaseComObject(ref selectedItem);
    ComMarshaler<Selection>.releaseComObject(ref selection);
    private void SelectedAppointment_Open(ref bool Cancel)
    this.StopSelectedItemMonitor();
    private void SelectedAppointment_Send(ref bool Cancel)
    Cancel = true;
    this.selectedAppointment.Display();
    private void StopSelectedItemMonitor()
    if (this.selectedAppointment != null)
    this.selectedAppointment.Open -= new ItemEvents_10_OpenEventHandler(SelectedAppointment_Open);
    ((ItemEvents_10_Event)this.selectedAppointment).Send
    -= new ItemEvents_10_SendEventHandler(SelectedAppointment_Send);
    ComMarshaler<AppointmentItem>.releaseComObject(ref this.selectedAppointment);
    public static class ComMarshaler<T>
    public static void releaseComObject(ref T anObject)
    if (anObject != null && Marshal.IsComObject(anObject))
    Marshal.ReleaseComObject(anObject);
    anObject = default(T);

  • Sender unspecified in outlook express

    I just installed PSE 7 and as with some of the previous versions I am getting the "sender unspecified" in outlook express when I try to share pictures. I realize that an easy fix is to just press forward, but c'mon Adobe, can't you make this software work with outlook express. I tried the hotfix that is posted on the website and my computer says that I already have a newer version of the update and lets me go no further. So therefore, still no fix! Anybody have a suggestion on how to fix this problem or is it something you just have to live with. Thanks for your help.

    Just spent hours trying to resolve this issue. After several days and out of the blue I ran across this information which I followed and it solved the "sender unspecified" issue with Adobe Photoshop 9.
    "I have now discovered how to stop the auto analyzer running on  startup - you have to run Premiere Elements, choose "Organize", choose  "Organizer", choose "Edit > Preferences" and choose "Auto-Analyzer  Options".  There you can untick "Run Analyzer on Start Up" (and you  might want to untick "Analyze All Media in Catalog Automatically".  Then  click "OK".
    However, you are then confronted with a  dialog box titled "Missing Sender E-mail Address" which reads "Please  enter your E-mail address".  Click OK, and you find yourself in a dialog  labelled "Sharing" in which you are required to enter your name and  your email address."
    Thought I would copy this info and repost it as a reply to these enquiries. The problem drove me nuts and the above procedure quickly resolved the issue for me, although I did not have to do the part about "Missing Sender E-mail Address" etc. as after I did the first part I then tried to send a picture via Photoshop via Outlook Express and the email produced was correct with the appropriate sender name, send button etc.

  • Is there a way to automatically update events in the Outlook 2010 calendar when adding events in the iCloud calendar in Outlook 2010?

    I am using Windows 7 and Outlook 2010. I have synced my Outlook calendar with my iPhone using the iCloud Control Panel. This is great, but when I add an event in the iCloud calendar in Outlook 2010 and subsequently send out invitations to the event, I get the following error:
    "This meeting is not in the Calendar folder for this account. Responses to this meeting will not be tallied. Do you want to send anyway?"
    I select "Yes" and the invite goes out. However, when invitees receive the email invitation, there should be 2 emails - one from Outlook and one from iCloud. The iCloud invite does not always come through. If the invitee responds to the Outlook email invite, it does not show up on the iCloud Calendar.
    Is there a reason that the iCloud email is not always sent or is there a way to some how update the Windows Outlook Calendar when adding events in the iCloud Calendar through Outlook?

    I have just discovered this problem as well.
    Very annoying!
    Now all off my meetings entered in Outlook on my desktop PC are not syncing with my ipad and iphone.
    If I had known this would have happened I would never have downloaded Version 2.0 of the icloud control panel.
    Does anyone know how I can get the earlier version back?

  • Event of Sending Mail From Outlook Integration Add-On

    Dear Experts,
    I am not able to find the event if I am sending mail from outlook integration add-on. Suppose I open a Sales Order that already entered and click on Mail Menu and click on 'Send' Button (Form Type = 188). It sends the mail successfully from Outlook but I am not able to use the event after that while it shows me operation completed successfully.
    I am writting it as follows:
    if (pVal.FormType == 188 && pVal.ActionSuccess == true && pVal.EventType == BoEventTypes.et_ITEM_PRESSED && pVal.ItemUID == "1")
    I have used it on Form Data Event too but no success.
    if (BusinessObjectInfo.BeforeAction == false)
                    switch (BusinessObjectInfo.EventType)
                        case BoEventTypes.et_FORM_DATA_ADD:
                                switch (BusinessObjectInfo.FormTypeEx)
                                            Case "188":
                                            }break;
    Plz help me.
    Regards

    Hi,
    Thanks for replying.
    I want a report that how many times a mail is sent against an Order.
    What i am doing:
    1. Open particular Sales Order.
    2. Click Mail Menu
    3. Click Send Button.
    4. Here comes an Popup box that a third party is trying to send a mail coz I am using outlook integration add-on to send mail. I allow it to send the mail.
    5. Mail is send successfully. I got the status bar message also.
    Now I want to write my event but not able to do that.
    plz reply now.
    Regards

  • TS4002 As of 4pm PDT, I cannot send email from Outlook via iCloud; my wife has the same problem.  Where/how do I report this problem?  Apple support seems to be available only if one is using a Mac product.

    Originating discussion

    Same problem with sending mail from Outlook 2010 (Win7 64 bit - started yesterday) and Windows Live Mail 2011 (Win7 32-bit).
    Server Error 334
    Server Response 334
    Server: smtp.mail.me.com
    Error code 0x80004005
    Protocol smtp
    Port 587
    SSL
    No issues sending iCloud email from the browser / web iCloud interface or from my Android phone.
    Not finding any of this in Google searches yet.

  • When i try and click on an email address is sends me to outlook instead of yahoo email? I changed the settings in internet options so now it opens internet explorer to open yahoo email. Now what

    When I am in craigslist and want to respond to an ad, I click on the email address and it was sending me to outlook express. Then I went into internet options and change the email client to yahoo, and now it send me to yahoo mail ,which is where I want to go. But it is sending me through Internet Explorer, and not Foxfire. What is going on and how do I fix this? I have Foxfire 6.0.

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • Is there a way to detect the event when device goes to sleep and the screen blackens?

    I want to detect the event when the iOS device goes to sleep and the screen blackens?
    Is there any way to do it?

    Hi,
    A small idea, please check whether it will work or not.
    You can achieve this by using combination of DNS server and reverse proxy server.( Customized apache). Make 'A' record for www.abcd.com to reverse proxy server IP address in your DNS.
    So it will resolve your reverse proxy IP address for requests.
    Configure appche to accept incoming request for www.abcd.com and points towards www.abcd.com/parameters.
    I think this will solve your problem.  Only one condition is that proxy server will communicate with www.abcd.com on behalf of client.
    Follow the link for configuration of reverse proxy server
    http://www.slashroot.in/how-configure-basic-apache-reverse-proxy
    HTH
    Naisam

  • How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?

    How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?
    I have a HTML extension running in In-design CC 2014 version.
    I want to perform some required set of actions before my extension window is closed(by clicking on the cross button on top right corner).
    Does In-design throws any event for it? Or can we capture it using C++ plugin in some way?

    Naah.......haven't got any event for that yet.
    Although, since HTML extensions are using chromium browser,  as a workaround, u can attach listener to HTML onClose event, but it won't solve any purpose if you
    are looking to logout session or do some business login in your code.

  • Error message 'The Outlook data file (.pst) failed to load for this session.' when adding PST in Outlook addin

    Hi All,
    I have an Outlook (2003-2013) addin developed using C# (NOT VSTO).
    A new client (using the desktop client for Outlook 365) has got a COMException error message stating 'The Outlook data file (.pst) failed to load for this session.' at the code line where I add the PST store (using Microsoft.Office.Interop.Outlook.NameSpaceClass.AddStoreEx).
    I have never come across this error message before and there is barely any mention of this message on any forums. The only question I could find regarding this has been asked mid 2014 and hasn't been answered.
    I'm fairly sure this is not related to either DisablePST or PSTDisableGrow registry key settings as I check fore their existance and notify the user separately.
    Could anyone help me out on how to resolve this? I do not know where to begin even.
    Thanks!!
    Cheers!

    Hi Eugene,
    Thanks for the reply.
    I pass the location that the PST is to be created (as a string), and the OlStoreType.olStoreUnicode constant.
    The client is using a network location to store the PST file (even though we advised them not to) - leading to many corrupt PST files (that they are apparently happy to live with), but this is the first time we came across this message.
    I would assume the problem is with that file, as no other clients are having any issue like this.
    Have you come across this error message? Do you know what sort of scenario could be responsible for it?
    Or would I have to file it under "random problems generated by network PSTs"? :P
    Cheers!

  • My outlook 2007 is missing the iTunes Outlook Addin.  Can I download this somewhere?

    My outlook 2007 is missing the iTunes Outlook Addin.  Can I download this somewhere?

    Hi There,
    Please refer: Download Acrobat products | 9, 8
    Thanks,
    Atul Saini

  • My problem is that my iCal won't sync from my first-generation iPad to my computer, and the computer sends events multiple times back to the iPad... which is now full of duplicate events. I'm NOT on iCloud.

    I'm just an old lady who doesn't know a lot about this stuff, but I do love my iPad and miss my portable calendar! My problem is that my iCal won't sync from my (first-generation, cheaper of the two models) iPad to my computer, and the computer sends events multiple times back to the iPad... which is now full of duplicate events. I'm NOT on iCloud. I've had this problem for nearly a year now. My Really Really Smart son couldn't fix it for me.

    djb53 wrote:
    Can take some time.... how much time?
    There's no simple answer to that. My calendar goes back to 2004 and is moderately busy; it took around an hour. It's possible that you've hit a slow period on the server - it happens.
    In order for it to work, your calendars should show on the MobileMe site, they should be listed under your MobileMe login name in the calendar list in iCal (calendars listed under 'On My Mac' will not sync) and your MM account details have to be entered in iCal Preferences>Accounts (this should have happened by itself).
    If it's not working please see the page I linked to.

Maybe you are looking for