Class InlineShape (Word VBA)
The class InlineShape represents an object in the text layer of a document. An inline shape can only be a picture, an OLE object, or an ActiveX control. The InlineShape object is a member of the InlineShapes collection. The InlineShapes collection contains all the shapes that appear inline in a document, range, or selection.
To use a InlineShape class variable it first needs to be instantiated, for example
Dim ise as InlineShape Set ise = ActiveDocument.Range.InlineShapes(Index:=1)
The following procedures can be used to set variables of type InlineShape: Field.InlineShape, InlineShapes.Add3DModel, InlineShapes.AddChart2, InlineShapes.AddHorizontalLine, InlineShapes.AddHorizontalLineStandard, InlineShapes.AddOLEControl, InlineShapes.AddOLEObject, InlineShapes.AddPicture, InlineShapes.AddPictureBullet, InlineShapes.AddSmartArt, InlineShapes.AddWebVideo, InlineShapes.Item, InlineShapes.New, ListFormat.ListPictureBullet ...ListLevel.ApplyPictureBullet, ListLevel.PictureBullet, Shape.ConvertToInlineShape, ShapeRange.ConvertToInlineShape.
Here is an example of processing the InlineShape items in a collection.
Dim ise As InlineShape For Each ise In ActiveDocument.Range.InlineShapes Next ise
Delete - Deletes the specified inline shape.
Reset - Removes changes that were made to an inline shape.
Select - Selects the specified inline shape.
AlternativeText returns or sets a String that represents the alternative text associated with a shape in a webpage.
HasChart true if the specified shape is a chart.
HasSmartArt returns True if there is a SmartArt diagram present on the shape.
Height returns or sets the height of an inline shape.
IsPictureBullet true indicates that an InlineShape object is a picture bullet.
LockAspectRatio msoTrue if the specified shape retains its original proportions when you resize it. MsoFalse if you can change the height and width of the shape independently of one another when you resize it.
ScaleHeight scales the height of the specified inline shape relative to its original size.
ScaleWidth scales the width of the specified inline shape relative to its original size.
Script returns a Script object, which represents a block of script or code associated with an image on the specified Web page.
SmartArt returns a SmartArt object that provides a way to work with the SmartArt associated with the specified inline shape.
Title returns or sets a String that contains a title for the specified inline shape.
Type returns the type of inline shape.
Width returns or sets the width, in points, of the specified inline shape.
Borders - A collection of Border objects that represent the borders of an object.
Chart - Represents a chart in a document.
Field - Represents a field. The Field object is a member of the Fields collection. The Fields collection represents the fields in a selection, range, or document.
FillFormat - Represents fill formatting for a shape. A shape can have a solid, gradient, texture, pattern, picture, or semi-transparent fill.
GlowFormat - Represents the glow formatting for a shape or range of shapes.
GroupShapes - Represents the individual shapes within a grouped shape. Each shape contained within a group of shapes is represented by a Shape object.
HorizontalLineFormat - Represents horizontal line formatting.
Hyperlink - Represents a hyperlink. The Hyperlink object is a member of the Hyperlinks collection.
LineFormat - Represents line and arrowhead formatting. For a line, the LineFormat object contains formatting information for the line itself; for a shape with a border, this object contains formatting information for the shape's border.
LinkFormat - Represents the linking characteristics for an OLE object or picture.
Model3DFormat - Represents the properties of a 3D model shape.
OLEFormat - Represents the OLE characteristics (other than linking) for an OLE object, ActiveX control, or field.
PictureFormat - Contains properties and methods that apply to pictures and OLE objects. The LinkFormat object contains properties and methods that apply to linked OLE objects only. The OLEFormat object contains properties and methods that apply to OLE objects whether or not they're linked.
Range - Represents a contiguous area in a document. Each Range object is defined by a starting and ending character position.
ReflectionFormat - Represents the reflection formatting for a shape or range of shapes.
ShadowFormat - Represents shadow formatting for a shape.
Shape - Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, ActiveX control, or picture. The Shape object is a member of the Shapes collection, which includes all the shapes in the main story of a document or in all the headers and footers of a document.
SoftEdgeFormat - Represents the soft edge formatting for a shape or range of shapes.
TextEffectFormat - Contains properties and methods that apply to WordArt objects.