Documents for Word, .NET Edition
GrapeCity.Documents.Word Assembly / GrapeCity.Documents.Word Namespace / ShapeCollection Class / Insert Method / Insert(Single,Single,String,GeometryType,InsertLocation) Method
The shape width, in points.
The shape height, in points.
If not null, a TextFrame with this text is added to the shape.

Note that some geometries do not allow text frames (see Extensions.TextFrameSupported). If this parameter is not null and type specifies one of those geometries, an exception will be thrown.

The geometry type of the shape.
The target InsertLocation for the insertion.

In This Topic
    Insert(Single,Single,String,GeometryType,InsertLocation) Method
    In This Topic
    Inserts a new Shape with a specified size, text and geometry into this collection at a specified location.
    Syntax
    'Declaration
     
    Public Overloads Function Insert( _
       ByVal width As System.Single, _
       ByVal height As System.Single, _
       ByVal text As System.String, _
       ByVal type As GeometryType, _
       ByVal location As InsertLocation _
    ) As Shape
    public Shape Insert( 
       System.float width,
       System.float height,
       System.string text,
       GeometryType type,
       InsertLocation location
    )

    Parameters

    width
    The shape width, in points.
    height
    The shape height, in points.
    text
    If not null, a TextFrame with this text is added to the shape.

    Note that some geometries do not allow text frames (see Extensions.TextFrameSupported). If this parameter is not null and type specifies one of those geometries, an exception will be thrown.

    type
    The geometry type of the shape.
    location
    The target InsertLocation for the insertion.

    Return Value

    The inserted Shape.
    See Also