RemoveServObj Method

Removes a service object with the specified index from the service object collection of the group/page, and returns the number of remaining service objects.

Applies to: Page object, Shape object

Syntax

[[Let] countRet =] object.RemoveServObj ( index )

The RemoveServObj method syntax has these parts:

Part Description
object Required. An expression that returns an object in the Applies to list.
index Required. An expression that returns a Long value. The index of the service object to be deleted in the service object collection of the group/page.
countRet Optional. A Long type variable

Remarks

If index is less than 1, or greater than the number of service objects in the group/page, the RemoveServObj method doesn't remove the service object and returns the number of service objects in the group/page. When a service object is removed, the remaining service objects are re-indexed - that is, the index of every service object after the removed one is decreased by 1. To find out the number of service objects in the group/page, use the ServObjsNum method.

 

 

See Also

RemoveAllServObjs method, RemoveServObjByID method, ReorderServObj method, ReorderServObjByID method, ServObj method, ServObjByID method, ServObjsNum method, ServObj object