Using the Managed Exchange TreeView Control
Topic Last Modified: 2009-07-24
The Managed TreeView Control sample application can be used to add and remove roots from the TreeView control, copy, move, rename, and delete folders in the Exchange store.
Note
A root node corresponding to the default public store on a computer running Microsoft® Exchange Server 2007 will contain folder nodes for all public folders in the Exchange organization, including folders located on different folders. Operations on folders that are not located on the server that corresponds to the root node are not allowed, and will result in a (502) Bad Gateway or (401) Unauthorized error.
The following illustration shows the sample application.
To display low-priority error information
- Select Error Events Returned. This will display low-priority error information in the Error Information text box. Otherwise, low-priority error information will be returned in a message box. All high-priority error information will be displayed in the Error Information text box.
To add a root
- Enter the Uniform Resource Identifier (URI) of a folder in the Exchange store to which you have permissions in the Folder URI text box.
- Enter the display name of the root in the Root Name text box.
- Enter your credentials in the User Name, Password, and Domain text boxes.
- Click Add Root.
This may be repeated with a different folder URI to add another root to the TreeView control.
To remove a root
- Enter the URI corresponding to the root that you want to remove in the Folder URI text box.
- Click Remove Root.
To remove all roots
- Click Remove All Roots.
To create a new folder
- With Context Menu Enabled selected, right-click a folder node in the TreeView control.
- Click New.
- Enter the folder name in the New Folder window and click OK.
A new folder is created in the Exchange store.
To rename a folder
- With Context Menu Enabled selected, right-click a folder node in the TreeView control.
- Click Rename.
- Enter the folder name in the Rename Folder window and click OK.
The folder is renamed in the Exchange store.
To delete a folder
- With Context Menu Enabled selected, right-click a folder node in the TreeView control.
- Click Delete.
- Click Yes to delete the folder.
The folder is deleted in the Exchange store.
To move a folder
- With Drag-Drop Enabled selected, hold down the right mouse button and drag the folder to another folder node.
- Release the right mouse button and click Move on the drag-drop context menu.
Or
- With Drag-Drop Enabled selected, hold down the left mouse button and drag the folder to another folder node.
- Release the left mouse button.
The folder is moved in the Exchange store.
To copy a folder
- With Drag-Drop Enabled selected, hold down the right mouse button and drag the folder to another folder node.
- Release the right mouse button and click Copy on the drag-drop context menu.
The folder is copied in the Exchange store.