0
我有我的代碼是這樣的:Outlook VBA。實施.SentOnBehalfOfName到我的代碼
Public WithEvents myItem As Outlook.MailItem
Private Sub Application_ItemLoad(ByVal Item As Object)
If Item.Class = olMail Then
Set myItem = Item
End If
End Sub
Private Sub myItem_Open(Cancel As Boolean)
Dim oAccount As Outlook.Explorer
Dim oMail As MailItem
Dim Recip As Outlook.Recipient
Set oAccount = Application.ActiveExplorer
MsgBox (oAccount.CurrentFolder.Store)
If oAccount.CurrentFolder.Store = "[email protected]" Then
MsgBox ("CC needs to be added")
Set Recip = myItem.Recipients.Add("[email protected]")
Recip.Type = olCC
Recip.Resolve
Else
MsgBox ("no need to add CC")
End If
End Sub
我想補充像myItem.SentOnBehalfOfName =「[email protected]」到我的代碼,而只是將其粘貼到我的代碼不起作用。我是編碼技術人員,所以可能我必須先設置一些東西。任何人都可以幫助我這個?
我一直在尋找幾個小時。我已經嘗試了myItem.SentOnBehalfOfName =「[email protected]」,但它實際上什麼都不做。它也沒有顯示任何錯誤,所以我不知道什麼可能是錯的。任何人都有線索?
先搜索。基於該搜索,將myItem.SentOnBehalfOfName =「[email protected]」放入您的代碼中,如果有問題,則詢問有關問題。 – niton
我一直在尋找幾個小時。我已經嘗試了myItem.SentOnBehalfOfName =「[email protected]」,但它實際上什麼都不做。它也沒有顯示任何錯誤,所以我不知道什麼可能是錯的。任何人都有線索? – Art