Methods
- Func Add() As
-
Creates a new body and adds it to the Bodies collection.
This body becomes the current one
- Returns:
- The created body
- Example:
-
The following example creates a body names NewBody
in the body collection of the rootPart part
in the partDoc part document. NewBody becomes
the current body in partDoc.
Set rootPart = partDoc.Part Set NewBody = rootPart.Bodies.Add()
dd>
- Func Item( iIndex) As
-
Returns a body using its index or its name from the Bodies
collection.
- Parameters:
-
- iIndex
- The index or the name of the body to retrieve from the collection of bodies. As a numerics, this index is the rank of the body in the collection. The index of the first body in the collection is 1, and the index of the last body is Count. As a string, it is the name you assigned to the body using the property. dd>
- Returns:
- The retrieved body
- Example:
-
This example retrieves in ThisBody the fifth body
in the collection and in ThatBody the body
named MyBody in the body collection of the partDoc
part document.
Set BodyColl = partDoc.Part.Bodies Set ThisBody = BodyColl.Item(5) Set ThatBody = BodyColl.Item("MyBody")dd>