更新时间:2023-12-01 10:31:52
H,
GetSharedDefaultFolder 方法Namespace类的ID返回一个Folder对象,该对象代表指定用户的指定默认文件夹.例如:
The GetSharedDefaultFolder method of the Namespace class returns a Folder object that represents the specified default folder for the specified user. For example:
Sub ResolveName()
Dim myNamespace As Outlook.NameSpace
Dim myRecipient As Outlook.Recipient
Dim CalendarFolder As Outlook.Folder
Set myNamespace = Application.GetNamespace("MAPI")
Set myRecipient = myNamespace.CreateRecipient("Dan Wilson")
myRecipient.Resolve
If myRecipient.Resolved Then
Call ShowCalendar(myNamespace, myRecipient)
End If
End Sub
Sub ShowCalendar(myNamespace, myRecipient)
Dim CalendarFolder As Outlook.Folder
Set CalendarFolder = _
myNamespace.GetSharedDefaultFolder _
(myRecipient, olFolderCalendar)
CalendarFolder.Display
End Sub
如何:创建新的Outlook约会项目文章介绍了如何在文件夹中创建约会.
The How To: Create a new Outlook Appointment item article describe how to create an appointment in the folder.