Поделиться через


Variable.Index Property (Word)

Returns a Long that represents the ordinal position of a variable with in the collection of variables. Read-only.

Syntax

expression .Index

expression Required. A variable that represents a Variable object.

Example

This example adds a document variable to the active document and then returns the position of the specified variable in the Variables collection.

Set myVar = ActiveDocument.Variables.Add(Name:="Name", _ 
 Value:="Joe") 
num = myVar.Index

See Also

Concepts

Variable Object Members

Variable Object