
## index_of_key(name) {#str}

Returns the zero-based index of the specified document variable in the collection.


```python
def index_of_key(self, name: str):
    ...
```

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | The case-insensitive name of the variable. |

### Returns

The zero based index. Negative value if not found.


### See Also

* module [aspose.words](../../)
* class [VariableCollection](../)

