function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; Par: array of Variant): Variant;
Use IDispatchInvoke to access a COM Automation property or method whose name is a reserved word.
var
AObject: Variant;
AType: String;
begin
AObject := CreateOleObject('MyObject');
// Set a property named 'Type'
// Cannot use "AObject.Type := 'MyType';" because Type is a reserved word
IDispatchInvoke(AObject, True, 'Type', ['MyType']);
// Get a property or call a method named 'Type'
AType := IDispatchInvoke(AObject, False, 'Type', ['']);
end;