2017-09-01 72 views
0

我有一些代碼按預期工作:實施抄送地址

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 = "[email protected]" Then 
    MsgBox ("CC needs to be added") 
Else 
    MsgBox ("no need to add CC") 
End If 
End Sub 

我想補充像oAccount.CC =「EMAIL_ADDRESS」收穫的人自動填寫抄送領域。

回答