Skip to main content
All docs
V25.1
  • OleObjectType Class

    Contains strings used to specify content types for OLE objects.

    Namespace: DevExpress.XtraRichEdit.API.Native

    Assembly: DevExpress.RichEdit.v25.1.Core.dll

    NuGet Package: DevExpress.RichEdit.Core

    Declaration

    public static class OleObjectType

    Remarks

    Use the ShapeCollection.InsertOleObject and ShapeCollection.InsertOleObjectAsIcon methods to add OLE objects to the document. The OleObjectType class helps you specify the content type associated with the OLE object.

    Document document = wordProcessor.Document;
    // Insert an OLE object. Link it to an Excel worksheet.
    // The OLE object is displayed in the document as an image.
    Shape oleObject = document.Shapes.InsertOleObject(document.CreatePosition(1780), @"D:\ExcelWorkbook.xlsx",
        OleObjectType.ExcelWorksheet, DocumentImageSource.FromFile(@"Images\Spreadsheet.png"));
    // Specify the object position on the page.
    oleObject.RelativeHorizontalPosition = ShapeRelativeHorizontalPosition.Column;
    oleObject.RelativeVerticalPosition = ShapeRelativeVerticalPosition.Paragraph;
    oleObject.Offset = new PointF(0, 0);
    // Specify how text wraps around the object. 
    oleObject.TextWrapping = TextWrappingType.TopAndBottom;
    

    Inheritance

    Object
    OleObjectType
    See Also