How to: Get Availability Information for an Exchange User's Manager

Office 2013 and later

This example displays the next free 60-minute time slot in the calendar for a user's manager.

This code sample checks whether the current user is an Exchange user. If so, and if the current user has a manager, it obtains the manager's information by calling the GetExchangeUser method of the AddressEntry object and the GetExchangeUserManager method of the ExchangeUser object. The manager's information is contained in an ExchangeUser object that includes the manager's free/busy schedule.

If you use Visual Studio to test this code example, you must first add a reference to the Microsoft Outlook 15.0 Object Library component and specify the Outlook variable when you import the Microsoft.Office.Interop.Outlook namespace. The Imports or using statement must not occur directly before the functions in the code example but must be added before the public Class declaration. The following lines of code show how to do the import and assignment in Visual Basic and C#.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

Other resources

Show: