MailItem.Actions プロパティ (Outlook)

アイテムの使用可能なすべてのアクションを表す Actions コレクションを取得します。 読み取り専用です。

構文

expression。 Actions

expression は MailItem オブジェクトを表す変数です。

例

この Visual Basic for Applications (VBA) の例では、新しいメール アイテムを作成し、 Actions.Add メソッドを使用して、 アクション を追加します。 現在のユーザーにメール アイテムを送信します。 受信されたメール アイテムには、 返信と 全員へ返信などの標準のアクションだけでなく" 同意"アクションがあります。

Sub AddAction() 
 
 Dim myItem As Outlook.MailItem 
 
 Dim myAction As Outlook.Action 
 
 
 
 Set myItem = Application.CreateItem(olMailItem) 
 
 Set myAction = myItem.Actions.Add 
 
 myAction.Name = "Agree" 
 
 myItem.To = Application.GetNamespace("MAPI").CurrentUser 
 
 myItem.Send 
 
End Sub

例を次の Visual Basic for Applications では、新しいメール アイテムを作成し、 Actions.Add メソッドを使用して呼び出され、 リンク元に アクション を追加します。 この操作を実行すると、元のメール アイテムへのリンクが挿入されます。

Sub AddAction2() 
 
 Dim myItem As Outlook.MailItem 
 
 Dim myAction As Outlook.Action 
 
 Set myItem = Application.CreateItem(olMailItem) 
 
 Set myAction = myItem.Actions.Add 
 
 
 
 myAction.Name = "Link Original" 
 
 myAction.ShowOn = olMenuAndToolbar 
 
 myAction.ReplyStyle = olLinkOriginalItem 
 
 myItem.To = "Dan Wilson" 
 
 myItem.Send 
 
End Sub

関連項目

MailItem オブジェクト

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

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