我目前有在Outlook中通过Sharepoint电子邮件循环的VBA代码;如何选择“打开此任务...”按钮,输入信息,然后将其关闭?到目前为止,这是一段代码,文件夹名称已加星标:
Dim Namespace As Outlook.Namespace
Dim Folder As Outlook.MAPIFolder
Dim SubFolder As Outlook.MAPIFolder
Dim InnerFolder As Outlook.MAPIFolder
Dim Item As Object
Dim MailTask As Outlook.MailItem
On Error Resume Next
Set OL = GetObject(, "Outlook.Application")
If Err.Number = 0 Then
Set Namespace = OL.GetNamespace("MAPI")
For Each Folder In Namespace.Folders
If StrComp(Folder.Name, "*****") = 0 Then
For Each SubFolder In Folder.Folders
If StrComp(SubFolder.Name, "*****") = 0 Then
For Each InnerFolder In SubFolder.Folders
If StrComp(InnerFolder.Name, "*****") = 0 Then
*****Go through each email and open the "Open this task..." window*****
End If
Next InnerFolder
Exit For
End If
Next SubFolder
Exit For
End If
Next Folder
End If
End Function