View::RenameScopeNode method
The RenameScopeNode method renames a node.
Syntax
View.RenameScopeNode( _
ByVal NewName As String, _
ByVal ScopeNode As Variant _
)
Parameters
-
NewName
-
The new name for the node.
-
ScopeNode
-
Optional. A value that specifies the node to be renamed; if this parameter is not specified, the active scope node is used.
Return value
This method does not return a value.
Remarks
Attempting to change a node name that cannot be changed results in a Windows Script Host error.
Examples
' This example renames the Document object's RootNode.
' Retrieve the RootNode object.
Dim var1 As Variant
Set var1 = objDoc.RootNode
' Rename the scope node.
objView.RenameScopeNode "New Console Root", var1
' Free the Variant when done.
Set var1 = Nothing
Requirements
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Header |
|
IDL |
|
DLL |
|
IID |
IID_View is defined as 6EFC2DA2-B38C-457E-9ABB-ED2D189B8C38 |