Begins an advanced set property for a COM object.
Syntax
Result = SRP_Com("", "BEGINSET")
Returns
Always returns 1
Remarks
Added in 2.2.13
The BEGINSET allows you to set properties while having more control. The normal SET service only allows you to pass values. However, some COM properties can be picky on how their value is set. In those cases, you will use this service to begin a multi-step process that includes this service along with the ADDPARAM and ENDSET services.
Note that you do not specify the property name here, nor do you pass a handle to a COM object. You will do that when you use the ENDSET service.
Example
Here is a real world use case. In the Excel object model, the NumberFormat property expects a string of characters to indicate how to format the cell's contents. If try setting it to "000" via the SET service, SRP_COM will convert that into an integer. We can use the BEGINSET service to force it into a string
// Set the NumberFormat property to a string SRP_Com('', 'BEGINSET') SRP_Com('', 'ADDPARAM', 'String', '000') objListObject = SRP_Com(obj, 'ENDSET', 'NumberFormat')