Back to Devexpress

OleFormat.InsertType Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-oleformat.md

latest2.1 KB
Original Source

OleFormat.InsertType Property

Indicates whether the OLE object is embedded in the document or linked to a file.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
OleInsertType InsertType { get; }
vb
ReadOnly Property InsertType As OleInsertType

Property Value

TypeDescription
OleInsertType

An enumeration member that specifies how the OLE object is inserted into the document.

|

Available values:

NameDescription
Embedded

The OLE object’s data is embedded in the document.

| | Linked |

The OLE object is linked to a file.

|

Remarks

The following example retrieves all linked objects from the document:

csharp
using System.Linq;
// ...

Document document = wordProcessor.Document;
List<DrawingObject> linkedObjects = document.Shapes.Flatten()
.Where(x => x.Type == ShapeType.OleObject && 
x.OleFormat.InsertType == OleInsertType.Linked)
.ToList();
vb
Imports System.Linq
' ...

Dim document As Document = wordProcessor.Document
Dim linkedObjects As List(Of DrawingObject) = document.Shapes.Flatten() _
.Where(Function(x) x.Type = ShapeType.OleObject AndAlso _
x.OleFormat.InsertType = OleInsertType.Linked) _
.ToList()

See Also

OleFormat Interface

OleFormat Members

DevExpress.XtraRichEdit.API.Native Namespace