다음을 통해 공유


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.

Aa579858.86152575-2fee-4a8c-8a12-9f187c104bac(en-us,EXCHG.80).gif

To display low-priority error information

  1. 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

  1. Enter the Uniform Resource Identifier (URI) of a folder in the Exchange store to which you have permissions in the Folder URI text box.
  2. Enter the display name of the root in the Root Name text box.
  3. Enter your credentials in the User Name, Password, and Domain text boxes.
  4. Click Add Root.
    This may be repeated with a different folder URI to add another root to the TreeView control.

To remove a root

  1. Enter the URI corresponding to the root that you want to remove in the Folder URI text box.
  2. Click Remove Root.

To remove all roots

  1. Click Remove All Roots.

To create a new folder

  1. With Context Menu Enabled selected, right-click a folder node in the TreeView control.
  2. Click New.
  3. 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

  1. With Context Menu Enabled selected, right-click a folder node in the TreeView control.
  2. Click Rename.
  3. Enter the folder name in the Rename Folder window and click OK.
    The folder is renamed in the Exchange store.

To delete a folder

  1. With Context Menu Enabled selected, right-click a folder node in the TreeView control.
  2. Click Delete.
  3. Click Yes to delete the folder.
     
    The folder is deleted in the Exchange store.

To move a folder

  1. With Drag-Drop Enabled selected, hold down the right mouse button and drag the folder to another folder node.
  2. Release the right mouse button and click Move on the drag-drop context menu.

Or

  1. With Drag-Drop Enabled selected, hold down the left mouse button and drag the folder to another folder node.
  2. Release the left mouse button.
    The folder is moved in the Exchange store.

To copy a folder

  1. With Drag-Drop Enabled selected, hold down the right mouse button and drag the folder to another folder node.
  2. Release the right mouse button and click Copy on the drag-drop context menu.
    The folder is copied in the Exchange store.