AppointmentItem.RTFBody プロパティ (Outlook)

リッチ テキスト形式でMicrosoft Outlookアイテムの本文を表す バイト 配列を設定または返します。 値の取得と設定が可能です。

構文

RTFBody

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

注釈

Microsoft Visual Basic for Applications (VBA) の StrConv 関数、または C# または Visual Basic の System.Text.Encoding.AsciiEncoding.GetString() メソッドを使用して、バイト配列を文字列に変換します。

Microsoft Visual Basic for Applications (VBA) と C# で次のコード サンプルでは、アクティブなインスペクターで予定のリッチ テキスト形式の本文が表示されます。 AppointmentItem は、このコードの動作にアクティブなインスペクターをする必要があります。

Sub GetRTFBodyForMeeting() 
 
 Dim oAppt As Outlook.AppointmentItem 
 
 Dim strRTF As String 
 
 If Application.ActiveInspector.CurrentItem.Class = olAppointment Then 
 
 Set oAppt = Application.ActiveInspector.CurrentItem 
 
 strRTF = StrConv(oAppt.RTFBody, vbUnicode) 
 
 Debug.Print strRTF 
 
 End If 
 
End Sub
private void GetRTFBodyForAppt() 
 
{ 
 
 if (Application.ActiveInspector().CurrentItem is Outlook.AppointmentItem) 
 
 { 
 
 Outlook.AppointmentItem appt = 
 
 Application.ActiveInspector().CurrentItem as Outlook.AppointmentItem; 
 
 byte[] byteArray = appt.RTFBody as byte[]; 
 
 System.Text.Encoding encoding = new System.Text.ASCIIEncoding(); 
 
 string RTF = encoding.GetString(byteArray); 
 
 Debug.WriteLine(RTF); 
 
 } 
 
} 
 

関連項目

AppointmentItem オブジェクト

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

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