Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Searching for recurring appointments only

$
0
0

Hello,

I'd like to search for recurring appointments only within a date range.

I am using ExchangeServiceBinding. 

Any help is appreciated.

Example below is written C# but find all appointments within a date range. Although, I can loop thru and find only recurring appointments; however, i want to retrieve recurring appointments only in the FindItem which i think can improve performance if there is a way.

var fit = new FindItemType();
var shapeType = new ItemResponseShapeType();
shapeType.BaseShape = DefaultShapeNamesType.AllProperties;

fit.ItemShape = shapeType;

var types = new DistinguishedFolderIdType[1];
types[0] = new DistinguishedFolderIdType();
types[0].Id = DistinguishedFolderIdNameType.calendar;
types[0].Mailbox = new EmailAddressType();
types[0].Mailbox.EmailAddress = USER_SMTP_ADDRESS;

fit.ParentFolderIds = types;

var calendarViewType = new CalendarViewType();
calendarViewType.StartDate = DateTime.Today.AddDays(-5);

calendarViewType.EndDate = DateTime.Today.AddDays(5);
fit.Item = calendarViewType;

FindItemResponseType findItemResponse = ExchangeServiceBinding.FindItem(fit);
ResponseMessageType msg = findItemResponse.ResponseMessages.Items[0];

FindItemResponseMessageType itemMsg = (FindItemResponseMessageType)msg;
ArrayOfRealItemsType items = (ArrayOfRealItemsType)itemMsg.RootFolder.Item;





Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>