Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configures your add-in to activate based on supported events. Child of the LaunchEvents element. For more information, see Activate add-ins with events.
Add-in type: Document, Mail, Presentation, Workbook
Valid only in these VersionOverrides schemas:
- Mail 1.1
- Task pane 1.0
For more information, see Version overrides in the add-in only manifest.
Syntax
<ExtensionPoint xsi:type="LaunchEvent">
  <LaunchEvents>
    <LaunchEvent Type="OnNewMessageCompose" FunctionName="onMessageComposeHandler"/>
    <LaunchEvent Type="OnNewAppointmentOrganizer" FunctionName="onAppointmentComposeHandler"/>
    <LaunchEvent Type="OnMessageRead" FunctionName="onMessageReadHandler" HeaderName="contoso-encrypted"/>
    <LaunchEvent Type="OnMessageReadWithCustomHeader" FunctionName="onMessageReadWithCustomHeaderHandler" HeaderName="contoso-spam-simulation"/>
    <LaunchEvent Type="OnMessageReadWithCustomAttachment" FunctionName="onMessageReadWithCustomAttachmentHandler">
      <MessageAttachments>
        <MessageAttachment AttachmentExtension="xml"/>
        <MessageAttachment AttachmentExtension="json"/>
      </MessageAttachments>
    </LaunchEvent>
  </LaunchEvents>
  <!-- Identifies the runtime to be used (also referenced by the Runtime element). -->
  <SourceLocation resid="WebViewRuntime.Url"/>
</ExtensionPoint>
Contained in
Attributes
| Attribute | Required | Description | 
|---|---|---|
| Type | Yes | Specifies a supported event type. For the set of supported types, see the "Event canonical name and add-in only manifest name" column of the table of supported events in Activate add-ins with events. | 
| FunctionName | Yes | Specifies the name of the JavaScript function to handle the event specified in the Typeattribute. | 
| SendMode | No | Used by the OnMessageSendandOnAppointmentSendevents. Specifies the options available to the user if your add-in stops an item from being sent or if the add-in is unavailable. If the SendMode property isn't included, theSoftBlockoption is set by default. For a list of available send mode options, see Available send mode options. | 
| HeaderName (preview) | No | Specifies the internet header name used to identify a message on which the OnMessageReadorOnMessageReadWithCustomHeaderevent occurs. TheTypeattribute must be set toOnMessageReadorOnMessageReadWithCustomHeader. | 
Child elements
| Element | Required | Description | 
|---|---|---|
| MessageAttachments element (preview) | No | Configures an event-based add-in to activate on the OnMessageReadWithCustomAttachmentevent. | 
See also
- LaunchEvents
- Activate add-ins with events
- Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts
- Automatically check for an attachment before a message is sent
- Automatically update your signature when switching between Exchange accounts
- Implement event-based activation in Outlook mobile add-ins
- Create an encryption Outlook add-in
							
							
								Collaborate with us on GitHub
							
						
						
							The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
						
					Office Add-ins