This documentation is archived and is not being maintained.

Name Property (View Object)

Office 2003

A read-only property that returns a string containing the name of the view that is represented by the View object.


expression Required. An expression that returns a reference to the View object.

Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.


To determine whether a view is the default view, use the ViewInfo object.


In the following example from the Events developer sample form, the Name property of the View object is used to determine which view the user has switched to. If the view is the Archive Customer view, a note value is added to the form's underlying XML document:

function XDocument::OnSwitchView(eventObj)
   var oDate = new Date();

   if (XDocument.View.Name == "Archive Customer")
      var oNotesNode = XDocument.DOM
      var oDivNode = XDocument.DOM
         .createNode(1, "div", "");

      oDivNode.text = "Note recorded " + oDate.toString();

Applies to | View Object