求助Office outlook怎么转移conversation folder的邮件
大家应该知道office communicator 可以存储chat到outlook的conversation folder,但保存的却是server上的conversation folder,我想让他自动转移到本地的conversation folder,就像邮件一样配一个本地的pst,然后选择默认收件箱本地的,则outlook会从server上下载邮件到本地。我想conversation folder能不能也这么弄?或者设置什么规则让他自动转移?
[最优解释]
Dim sourceFolder As MAPIFolder
Dim destFolder As MAPIFolder
Private Sub Application_Startup()
Initialize_handler
End Sub
Public Sub Initialize_handler()
On Error Resume Next
Dim olApp As Outlook.Application
Dim nmsName As NameSpace
Dim fldFolder As MAPIFolder
Set olApp = Outlook.Application
Set nmsName = olApp.GetNamespace("MAPI")
For Each fldFolder In nmsName.Folders
For Each subFolder In fldFolder.Folders
If (subFolder.Name = "Conversation History" And fldFolder.Name = "***") Then
Set sourceFolder = subFolder
End If
If (subFolder.Name = "Conversation History" And fldFolder.Name = "###") Then
Set destFolder = subFolder
End If
Next
Next
Set myOlItems = sourceFolder.items
End Sub
Private Sub myOlItems_ItemAdd(ByVal Item As Object)
Dim myOlMItem As Outlook.mailItem
Set myOlMItem = Item
myOlMItem.Move destFolder
End Sub