If the shared folder was opened from a sharing invitation (or Open Other User's folder command), you may need to use the method in the next section. To access a shared folder in another user's Exchange server mailbox, you need to use GetSharedDefaultFolder to reference the mailbox, after resolving the address to the folder. ![]() Set Items = GetFolderPath("New PST\Test Cal").ItemsĪfter adding the function to ThisOutlookSession:įunction GetFolderPath(ByVal FolderPath As String) As Outlook.FolderįolderPath = Right(FolderPath, Len(FolderPath) - 2) Call the function in your macro in this manner, where GetFolderPath is the function name: To use a specific folder in another data file in the profile, you need to use a function. To use the currently selected folder, you'll need to use: Set Items = Session.GetDefaultFolder(olFolderCalendar)._ When the folder is a subfolder under the default Calendar folder, use this instead: Set Items = Session.GetDefaultFolder(olFolderCalendar).Parent._ To use a folder at the same level as the Default folders (such as Calendar, Inbox etc), use this in place of Set Items = Ns.GetDefaultFolder(olFolderCalendar).Items, where SharedCal is the folder name:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |