Hello everyone, I have downloaded the sourcecode for http://www.codeproject.com/Articles/...65#xx4626665xx and I am trying to make it so that I can get items from a specific folder that is NOT the inbox. If anyone is familiar with it, or has the chance to play with the class, please help.
Here is the code I have so far.
from the last line of my code, I need to get to here:
![Name: codeoutline.png
Views: 92
Size: 19.5 KB]()
Here is the code I have so far.
vbNET Code:
'' Since this is not a folder search we opt for Shallow Traversal Type 'Dim findItemRequest As New FindItemType() 'findItemRequest.Traversal = ItemQueryTraversalType.Shallow Dim findFolderRequest As New FindFolderType findFolderRequest.Traversal = FolderQueryTraversalType.Shallow '' The BaseShape property Gets or Sets the requested '' properties to return in a response 'Dim itemProperties As New ItemResponseShapeType() 'itemProperties.BaseShape = DefaultShapeNamesType.AllProperties Dim folderProperties As New FolderResponseShapeType folderProperties.BaseShape = DefaultShapeNamesType.IdOnly '' Here the item shape property is set, Go To definition on '' FindItemType for more info 'findItemRequest.ItemShape = itemProperties findFolderRequest.FolderShape = folderProperties '' Setup a folder array and define the folder Name and then set the parent '' folder ID Field with it to filter the search to just the inbox. Dim folderIDArray As DistinguishedFolderIdType() = New DistinguishedFolderIdType(0) {} folderIDArray(0) = New DistinguishedFolderIdType() folderIDArray(0).Id = DistinguishedFolderIdNameType.inbox findfolderRequest.ParentFolderIds = folderIDArray '' This block initiates the reading of the messages, '' Declares variables for the folder and items in that folder 'Dim findItemResponse As FindItemResponseType = exchangeServer.FindItem(findItemRequest) 'Dim folder As FindItemResponseMessageType = _ 'DirectCast(findItemResponse.ResponseMessages.Items(0), FindItemResponseMessageType) 'Dim folderContents As New ArrayOfRealItemsType() 'folderContents = DirectCast(folder.RootFolder.Item, ArrayOfRealItemsType) 'Dim items As ItemType() = folderContents.Items Dim findFolderReponse As FindFolderResponseType = exchangeServer.FindFolder(findFolderRequest)
from the last line of my code, I need to get to here: