วิธีใช้ฟิลด์“ จาก” ในมุมมองในคำสั่ง“ IF” - VBA - Outlook


0

Item.SentOnBehalfOfName ไม่ทำงาน นี่คือตัวอย่าง:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim prompt As String
prompt = "The BCC Field is empty! Send with BCC Field empty?"


If Item.SentOnBehalfOfName = "someone@eomewhere.com" Then
    If Item.BCC = "" Then
        If MsgBox(prompt, vbYesNo + vbQuestion, "BCC Field") = vbNo Then
            Cancel = True
        End If
    End If
End If

End Sub

โดยทั่วไปฉันต้องการ Messag ebox ปรากฏเฉพาะเมื่อเลือกจากฟิลด์ใน outlook ด้วยที่อยู่อีเมลเฉพาะฉันพบว่าชื่อสำหรับ "จาก" ฟิลด์เป็น. SentOnBehalfOfName แต่มันไม่ทำงานพฤติกรรมเหมือนคำสั่ง if ไม่เป็นความจริง

คำตอบ:


โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.