Variant.GetProperty

Syntax

GetProperty(Name: String): Variant;

Parameters

Name. Name of the property, which value must be obtained.

Description

The GetProperty method enables the user to get the value of the specified property, which name is passed as the Name input parameter, of the object stored in the variable.

Example

Sub UserProc;
Var
    v: Variant;
Begin
    Try
        v := Variant.GetActiveObject("Excel.Application");
        v := v.GetProperty("Name");
    Except
        Debug.WriteLine(Failed to get an object name);
    End Try;
End Sub UserProc;

After executing the example, if the Excel application is open, the "v" variable will contain the name of this application.

See also:

Variant