DefaultSorting Property

Microsoft Word Visual Basic

Returns or sets the sorting option for bookmark names displayed in the Bookmark dialog box (Insert menu). Read/write WdBookmarkSortBy.

WdBookmarkSortBy can be one of these WdBookmarkSortBy constants.
wdSortByLocation
wdSortByName

expression.DefaultSorting

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property doesn't affect the order of Bookmark objects in the Bookmarks collection.

Example

This example sorts bookmarks by location and then displays the Bookmark dialog box.

ActiveDocument.Bookmarks.DefaultSorting = wdSortByLocation
Dialogs(wdDialogInsertBookmark).Show