Share via


Office.SelectedItemDetails interface

Outlook で現在選択されているメッセージのプロパティを表します。

注釈

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

最小アクセス許可レベル: メールボックスの読み取り/書き込み

適用される Outlook モード: メッセージの作成、メッセージの読み取り

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-message-properties.yaml

// Retrieves the selected messages' properties and logs them to the console.
Office.context.mailbox.getSelectedItemsAsync((asyncResult) => {
  if (asyncResult.status === Office.AsyncResultStatus.Failed) {
    console.log(asyncResult.error.message);
    return;
  }

  asyncResult.value.forEach((message) => {
    console.log(`Item ID: ${message.itemId}`);
    console.log(`Subject: ${message.subject}`);
    console.log(`Item type: ${message.itemType}`);
    console.log(`Item mode: ${message.itemMode}`);
  });
});

プロパティ

itemId

現在選択されているメッセージの Exchange Web Services (EWS) アイテム識別子。

itemMode

現在選択されているメッセージの Outlook モード (Read または Compose)。

itemType

現在選択されている項目の種類。 Message は、現時点でサポートされている唯一の型です。

subject

現在選択されているメッセージの件名フィールドに表示される説明。

プロパティの詳細

itemId

現在選択されているメッセージの Exchange Web Services (EWS) アイテム識別子。

itemId: string;

プロパティ値

string

itemMode

現在選択されているメッセージの Outlook モード (Read または Compose)。

itemMode: string;

プロパティ値

string

itemType

現在選択されている項目の種類。 Message は、現時点でサポートされている唯一の型です。

itemType: MailboxEnums.ItemType | string;

プロパティ値

subject

現在選択されているメッセージの件名フィールドに表示される説明。

subject: string;

プロパティ値

string