ViewByID Method

Searches for a window with the specified ID (the ID property) in the window collection of the document. Returns a Window object that corresponds to the found document window.

Applies to: Document object

Syntax

[[Let] windowRet =] object.ViewByID ( viewID )

The ViewByID method syntax has these parts:

Part Description
object Required. An expression that returns a Document object.
viewID Required. An expression that returns a Long value. The ID (ID property) of the window to be found.
windowRet Optional. A Window type variable.

Remarks

If there is no window with the viewID ID in the collection, the ViewByID method returns Nothing.

 

See Also

FirstView method, NextView method, ViewsNum method, UpdateAllViews method