Retrieves a named property of another COM object and stores it in the internal array of this object. | |
Syntax: | object.GetObjectPropertyEx Object, PropertyName, InputArguments |
Parameters: |
Object As
object -
PropertyName
As String -
InputArguments As SAFEARRAY(VARIANT)* -
|
Description: | Gets the named property of the passed object with
the remaining arguments and asigns the property to this object. The
passed COM object must implement IDispatch for this method to work.
If the property does not happen to be an array a single dimension
array with one element will be created to hold it. The third
parameter listed (InputArguments) in this method is actually a
mechanism for passing a variable argument list. The scripting
syntax for passing the argument list is to just use normal argument
passing syntax as demonstrated in the example. Basic Scripts normal
calling convention is to pass everything ByRef. Some automation
servers do not handle these ByRef parameters well. If problems seem
to occur try passing the parameters using ByVal as demonstrated in
this example. Example: Private cimOleObj As Object Sub OnScreenOpen() cimOleObj.Cols = 4 Dim csa As CoCimSafeArray5 Set csa =
CreateObject("CIMPLICITY.CimSafeArray.5") csa.CreateVector cimVLong, 0, 1 Dim colID As Long For colID = 0 To cimOleObj.Cols - 1 csa.SetVectorElement 0, (1500 + colID
* 15) csa.SetObjectPropertyEx cimOleObj,
"ColWidth", ByVal colID Next colID For colID = 0 To cimOleObj.Cols - 1 csa.GetObjectPropertyEx cimOleObj,
"ColWidth", ByVal colID MsgBox csa.Element(0) Next colID End Sub |
See Also: | SetObjectProperty , GetObjectProperty , SetObjectPropertyEx |