OLEFormat.ClassType property (Word)
Returns or sets the class type for the specified OLE object, picture, or field. Read/write String.
Syntax
expression. ClassType
expression A variable that represents a 'OLEFormat' object.
Remarks
This property is read-only for linked objects other than DDE links.
You can see a list of the available applications in the Object type box on the Create New tab in the Object dialog box (Insert menu). You can find the ClassType string by inserting an object as an inline shape and then viewing the field codes. The class type of the object follows either the word "EMBED" or the word "LINK."
Example
This example loops through all the floating shapes on the active document and sets all linked Microsoft Excel worksheets to be updated automatically.
Dim shapeLoop As Shape
For Each shapeLoop In ActiveDocument.Shapes
With shapeLoop
If .Type = msoLinkedOLEObject Then
If .OLEFormat.ClassType = "Excel.Sheet" Then
.LinkFormat.AutoUpdate = True
End If
End If
End With
Next
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for