Syntax
INT = SetComProperty(IDispatch obj,STRING property,...)
Description
Sets the property of a COM object using script syntax.
Parameters
obj - The Object returned by the CREATECOMOBJECT command.
property - Name of the property to set.
... - Optional parameter list.
Return value
0 for Success.
Remarks
Parameters strings are specified by using C printf-like specifiers. The table below shows the supported specifiers:
Identifier
|
Type
|
%d
|
INT
|
%u
|
UINT
|
%e
|
DOUBLE
|
%b
|
INT
|
%v
|
VARIANT UDT.
|
%B
|
BSTR - Created with the SysAllocString API function
|
%s
|
STRING
|
%S
|
WSTRING
|
%T
|
WSTRING
|
%o
|
IDispatch COM object
|
%O
|
IUnknown COM object
|
%t
|
C time_t UDT
|
%W
|
SYSTEMTIME UDT
|
%f
|
FILETIME UDT
|
%D
|
C date type.
|
%p
|
POINTER
|
%m
|
Specifies a missing/optional argument
|
Example usage(s)
SetComProperty(_xmlDoc, ".Async = %b", FALSE)
SetComProperty(xlCells, ".Interior.Color = %d", RGB(0xee,0xdd,0x82))
SetComProperty(xlCells, ".Interior.Pattern = %d", 1) /* xlSolid */
SetComProperty(xlCells, ".Font.Size = %d", 13)
SetComProperty(xlCells, ".Borders.Color = %d", RGB(0,0,0))
SetComProperty(xlCells, ".Borders.LineStyle = %d", 1) /* xlContinuous */
SetComProperty(xlCells, ".Borders.Weight = %d", 2) /* xlThin */
|