Office.AddinCommands.EventCompletedOptions interface

イベントの処理が完了したときの Outlook での 送信 時アドインの動作を ItemSend 指定します。

注釈

[ API セット: メールボックス 1.8 ]

最小アクセス許可レベル: 制限

適用できる Outlook モード: 新規作成

プロパティ

allowEvent

完了したメソッドを使用してイベント ハンドラーの完了を通知する場合、この値は、処理されたイベントが実行を続行するか、取り消されるかを示します。 たとえば、イベントを処理する送信時アドインを ItemSendfalse設定allowEventすると、メッセージの送信を取り消すことができます。

プロパティの詳細

allowEvent

完了したメソッドを使用してイベント ハンドラーの完了を通知する場合、この値は、処理されたイベントが実行を続行するか、取り消されるかを示します。 たとえば、イベントを処理する送信時アドインを ItemSendfalse設定allowEventすると、メッセージの送信を取り消すことができます。

allowEvent?: boolean;

プロパティ値

boolean

注釈

[ API セット: メールボックス 1.8 ]

最小アクセス許可レベル (Outlook): 制限あり

適用できる Outlook モード: 新規作成

// In this example, the checkMessage function was registered as an event handler for ItemSend.
function checkMessage(event) {
    // Get the item being sent.
    const outgoingMsg = Office.context.mailbox.item;

    // Check if subject contains "BLOCK".
    outgoingMsg.subject.getAsync(function (result) {
        // Subject is in `result.value`.
        // If search term "BLOCK" is found, don't send the message.
        const notFound = -1;
        const allowEvent = (result.value.indexOf('BLOCK') === notFound);
        event.completed({ allowEvent: allowEvent });
    });
}