我有一些代码可以正常工作:
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
Set oAccount = Application.ActiveExplorer
MsgBox (oAccount.CurrentFolder.Store)
If oAccount.CurrentFolder.Store = "test@test.com" Then
MsgBox ("CC needs to be added")
Else
MsgBox ("no need to add CC")
End If
End Sub我想添加一些类似于oAccount.CC = "email_address“的内容,以便自动填充碳复制字段。
发布于 2017-09-01 17:28:15
使用
set Recip = myItem.Recipients.Add("user@test.demo")
Recip.Type = olCChttps://stackoverflow.com/questions/45997296
复制相似问题