VBA - Inline Shapes
An inline shape is an object that is in the text layer of the document.
An inline shape can only be a picture, an OLE Object or an ActiveX control.
Represents a object in the text layer of the document.
InlineShapes do not have names.
InlineShape objects are treated like characters and are positioned as characters within a line of text.
The Inlineshapes collection represents all the inline shapes in the document, range or selection.
The Count property for the InLineShapes collection in a document returns the number of shapes in the main story only.
If you want to count the number of inline shapes in other areas then use must use a Range object.
Use the new method to create a new picture as an inline shape
You can use the AddPicture and AddOleObject methods to add pictures or OLE Objects and link them to the source file.
Use the AddOleControl to add an Active X control.
Type Property
Use this property to return the type of the Inline Shape
InlineShape Object
The InlineShape object is a member of the InlineShapes collection.
The InlineShapes collection contains all the shapes in a document, range, or selection.
Use InlineShapes(index), where index is the index number, to return a single InlineShape object.
Inline shapes don't have names.
The following example activates the first inline shape in the active document.
This example saves the linked picture that's defined as the first inline shape in the active document when the document is saved.
InlineShapes Collection
This represents all the InlineShape objects
Field Property
This example inserts a graphic as an inline shape (using an INCLUDEPICTURE field) and then displays the shape's field code.
IsPictureBullet Property
Indicates if an InlineShape object is a picture bullet. Read-only.
Although picture bullets are considered inline shapes, searching a document's InlineShapes collection will not return picture bullets.
This example formats the selected list if the list if formatted with a picture bullet. If not, a message is displayed.
Use the following code to call the routine above.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext