AppointmentItem.Categories プロパティ (Outlook)

Outlook アイテムに割り当てられているカテゴリを表す 文字列 を設定または返します。 値の取得と設定が可能です。

構文

Categories

AppointmentItem オブジェクトを表す変数。

注釈

カテゴリ は、Outlook アイテムに割り当てられているカテゴリの名前の区切り記号付きの文字列です。 このプロパティは、複数の分類項目の区切り記号として、値の名前、 sList 、Windows レジストリに HKEY_CURRENT_USER\Control Panel\International の下に指定された文字を使用します。 カテゴリ名の文字列を項目名の配列に変換するには、Microsoft Visual Basic 関数 Split を使用します。

次の Microsoft Visual Basic for Applications (VBA) の例は、新しい予定を作成し、その予定を画面に表示し、[ 分類の表示] ダイアログ ボックスを開きます。 次に、 AppointmentItem.ShowCategoriesDialog を使用して、ユーザーによって割り当てられた分類項目を表示します。 この例を実行するときは、その前に "太田 喜世子" の部分を実際の受信者の名前に置き換えてください。

Sub Appointment() 
 
 'Creates an appointment to access ShowCategoriesDialog 
 
 Dim olApptItem As Outlook.AppointmentItem 
 
 
 
 'Creates appointment item 
 
 Set olApptItem = Application.CreateItem(olAppointmentItem) 
 
 olApptItem.Body = "Please meet with me regarding these sales figures." 
 
 olApptItem.Recipients.Add ("Dan Wilson") 
 
 olApptItem.Subject = "Sales Reports" 
 
 'Display the appointment 
 
 olApptItem.Display 
 
 'Display the Show Categories dialog box 
 
 olApptItem.ShowCategoriesDialog 
 
 MsgBox olApptItem.Categories 
 
End Sub

関連項目

AppointmentItem オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。