だから、あなたは、細胞が特定の値を持っている場合は、右、電子メールを送信します。以下のスクリプトを試してみてください。
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 200 Then
Call YourMacroName
End If
End If
End Sub
Sub Mail_small_Text_Outlook()
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Excel 2000-2016
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hi there" & vbNewLine & vbNewLine & _
"Cell A1 is changed" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"
On Error Resume Next
With OutMail
.To = "[email protected]"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Display 'or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
https://www.rondebruin.nl/win/s1/outlook/bmail9.htm
https://stackoverflow.com/questions/31817632/outlook-reply-to-an-email – braX
@braX唯一の問題は私の事前定義されたテンプレートから3つのフィールドを使用することです元のユーザーフォームを凌駕します。上記の解決策は電子メールのみに返信しますか? VBAに少し新が、私は別のマクロをトリガーする必要があるかもしれない新しい電子メールの受信時に思う? – selvend2
私のExcelファイルをトリガー/オープンする方法がちょっとわかりません – selvend2