Class Shape (Word VBA)

The class 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.

The main procedures of class Shape are CanvasShapes.AddCallout, CanvasShapes.AddConnector, CanvasShapes.AddCurve, CanvasShapes.AddLabel, CanvasShapes.AddLine, CanvasShapes.AddPicture, CanvasShapes.AddPolyline, CanvasShapes.AddShape, CanvasShapes.AddTextbox, CanvasShapes.AddTextEffect, Delete, Select, ShapeRange.Delete, ShapeRange.Select, Shapes.Add3DModel, Shapes.AddCallout, Shapes.AddCanvas, Shapes.AddChart2, Shapes.AddCurve, Shapes.AddLabel, Shapes.AddLine, Shapes.AddOLEControl, Shapes.AddOLEObject, Shapes.AddPicture, Shapes.AddPolyline, Shapes.AddShape, Shapes.AddSmartArt, Shapes.AddTextbox, Shapes.AddTextEffect and Shapes.AddWebVideo

Set

To use a Shape class variable it first needs to be instantiated, for example

Dim shp as Shape
Set shp = ActiveDocument.Background

The following procedures can be used to set variables of type Shape: CanvasItems, ShapeRange.CanvasItems, InlineShape.GroupItems, GroupItems, ShapeRange.GroupItems, CanvasShapes.Item, CanvasShapes.AddCallout, CanvasShapes.AddConnector, CanvasShapes.AddCurve, CanvasShapes.AddLabel, CanvasShapes.AddLine, CanvasShapes.AddPicture, CanvasShapes.AddPolyline, CanvasShapes.AddShape, CanvasShapes.AddTextbox, CanvasShapes.AddTextEffect, Document.Background, FreeformBuilder.ConvertToShape, GroupShapes.Item, Hyperlink.Shape, InlineShape.ConvertToShape, Duplicate, ParentGroup, ShapeRange.Item, ShapeRange.ParentGroup, ShapeRange.Group, Shapes.Item, Shapes.AddCallout, Shapes.AddCurve, Shapes.AddLabel, Shapes.AddLine, Shapes.AddPicture, Shapes.AddPolyline, Shapes.AddShape, Shapes.AddTextbox, Shapes.AddTextEffect, Shapes.Add3DModel, Shapes.AddChart2, Shapes.AddOLEControl, Shapes.AddOLEObject, Shapes.AddSmartArt, Shapes.AddWebVideo, Shapes.AddCanvas, TextFrame.Parent, Window.RangeFromPoint, CanvasShapes.Range, GroupShapes.Range, Range.ShapeRange, Selection.ShapeRange, Selection.ChildShapeRange, Ungroup, ShapeRange.Ungroup, ShapeRange.Duplicate, Shapes.Range, Chart.Shapes, Document.Shapes and HeaderFooter.Shapes

For Each

Here is an example of processing the Shape items in a collection.

Dim shpCanvasItem As Shape
For Each shpCanvasItem In CanvasItems
	
Next shpCanvasItem

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Add with its procedures CanvasShapes.AddCallout, CanvasShapes.AddConnector, CanvasShapes.AddCurve, CanvasShapes.AddLabel, CanvasShapes.AddLine, CanvasShapes.AddPicture, CanvasShapes.AddPolyline, CanvasShapes.AddShape, CanvasShapes.AddTextbox, CanvasShapes.AddTextEffect, Shapes.Add3DModel, Shapes.AddCallout, Shapes.AddCanvas, Shapes.AddChart2, Shapes.AddCurve, Shapes.AddLabel, Shapes.AddLine, Shapes.AddOLEControl, Shapes.AddOLEObject, Shapes.AddPicture, Shapes.AddPolyline, Shapes.AddShape, Shapes.AddSmartArt, Shapes.AddTextbox, Shapes.AddTextEffect and Shapes.AddWebVideo
Format with its procedures BackgroundStyle, GraphicStyle, HeightRelative, LayoutInCell, LinkFormat, OLEFormat, ScaleHeight, ScaleWidth, ShapeStyle, Visible, WidthRelative, WrapFormat, ShapeRange.BackgroundStyle, ShapeRange.GraphicStyle, ShapeRange.HeightRelative, ShapeRange.LayoutInCell, ShapeRange.ScaleHeight, ShapeRange.ScaleWidth, ShapeRange.ShapeStyle, ShapeRange.Visible, ShapeRange.WidthRelative and ShapeRange.WrapFormat
Sort/Order with its procedures ZOrder, ZOrderPosition, ShapeRange.ZOrder and ShapeRange.ZOrderPosition

Methods

These are the main methods of the Shape class

Delete - Deletes the specified shape node.

ActiveDocument.Background.Delete

Select - Selects the specified shape.

ActiveDocument.Background.Select

ShapeRange.Delete - Deletes the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
sre.Delete

ShapeRange.Select - Selects the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
sre.Select

Other Methods

CanvasShapes.BuildFreeform - Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.

Dim fbrBuildFreeform As FreeformBuilder
Set fbrBuildFreeform = ActiveDocument.Background.CanvasItems.BuildFreeform(EditingType:=msoEditingAuto, X1:=, Y1:=)

ShapeRange.Align - Aligns the shapes in the specified range of shapes.

Dim lngRelativeTo As Long: lngRelativeTo = 
Dim sre As ShapeRange: Set sre =  
sre.Align Align:=msoAlignLefts, RelativeTo:=lngRelativeTo

ShapeRange.Distribute - Evenly distributes the shapes in the specified range of shapes.

Dim lngRelativeTo As Long: lngRelativeTo = 
Dim sre As ShapeRange: Set sre =  
sre.Distribute Distribute:=msoDistributeHorizontally, RelativeTo:=lngRelativeTo

Shapes.BuildFreeform - Builds a freeform object.

Dim fbrBuildFreeform As FreeformBuilder
Set fbrBuildFreeform = Selection.HeaderFooter.Shapes.BuildFreeform(EditingType:=msoEditingAuto, X1:=, Y1:=)

Properties

CanvasShapes.Count returns a Long that represents the number of canvas shapes in the specified collection.

Dim lngCount As Long
lngCount = ActiveDocument.Background.CanvasItems.Count

CanvasShapes.Parent returns an object that represents the parent object of the specified CanvasShapes object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.CanvasItems.Parent

GroupShapes.Count returns a Long that represents the number of shapes in the collection.

Dim gss As GroupShapes: Set gss =  
Dim lngCount As Long
lngCount = gss.Count

GroupShapes.Parent returns an object that represents the parent object of the specified GroupShapes object.

Dim gss As GroupShapes: Set gss =  
Dim objParent As Object
Set objParent = gss.Parent

Adjustments returns an Adjustments object that contains adjustment values for all the adjustments in the specified Shape object that represents an AutoShape or WordArt.

Dim adjsAdjustments As Adjustments
Set adjsAdjustments = ActiveDocument.Background.Adjustments

AlternativeText returns or sets the alternative text associated with a shape in a webpage.

ActiveDocument.Background.AlternativeText =

Anchor returns a Range object that represents the anchoring range for the specified shape or shape range.

Dim rngAnchor As Range
Set rngAnchor = ActiveDocument.Background.Anchor

AutoShapeType returns or sets the shape type for the specified Shape object, which must represent an AutoShape other than a line or freeform drawing.

ActiveDocument.Background.AutoShapeType =

Callout returns a CalloutFormat object that contains callout formatting properties for the specified shape.

Dim cftCallout As CalloutFormat
Set cftCallout = ActiveDocument.Background.Callout

CanvasItems returns a CanvasShapes object that represents a collection of shapes in a drawing canvas.

Dim cssCanvasItems As CanvasShapes
Set cssCanvasItems = ActiveDocument.Background.CanvasItems

Chart returns a Chart object that represents a chart within the collection of shapes in a document.

Dim chrChart As Chart
Set chrChart = ActiveDocument.Background.Chart

Child true if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent.

Dim mtsChild As Office.MsoTriState
mtsChild = ActiveDocument.Background.Child

Decorative sets or returns the decorative flag for the specified object.

ActiveDocument.Background.Decorative =

Fill returns a FillFormat object that contains fill formatting properties for the specified shape.

Dim fftFill As FillFormat
Set fftFill = ActiveDocument.Background.Fill

Glow returns a GlowFormat object that represents the glow formatting for a shape.

Dim gftGlow As GlowFormat
Set gftGlow = ActiveDocument.Background.Glow

GroupItems returns a GroupShapes object that represents the individual shapes in the specified group.

Dim gssGroupItems As GroupShapes
Set gssGroupItems = ActiveDocument.Background.GroupItems

HasChart true if the specified shape has a chart.

Dim mtsHasChart As Office.MsoTriState
mtsHasChart = ActiveDocument.Background.HasChart

HasSmartArt returns True if there is a SmartArt diagram present on the shape.

Dim mtsHasSmartArt As Office.MsoTriState
mtsHasSmartArt = ActiveDocument.Background.HasSmartArt

Height returns or sets the height (in points) of the specified shape.

ActiveDocument.Background.Height =

HorizontalFlip indicates that a shape has been flipped horizontally.

Dim mtsHorizontalFlip As Office.MsoTriState
mtsHorizontalFlip = ActiveDocument.Background.HorizontalFlip

Hyperlink returns a Hyperlink object that represents the hyperlink associated with a Shape object.

Dim hypHyperlink As Hyperlink
Set hypHyperlink = ActiveDocument.Background.Hyperlink

ID returns the identification type for the specified shape.

Dim lngID As Long
lngID = ActiveDocument.Background.ID

Left returns or sets a Single that represents the horizontal position, measured in points, of the specified shape or shape range. Can also be any valid WdShapePosition constant.

ActiveDocument.Background.Left =

LeftRelative returns or sets a Single that represents the relative left position of a shape.

ActiveDocument.Background.LeftRelative =

Line returns a LineFormat object that contains line formatting properties for the specified shape.

Dim lftLine As LineFormat
Set lftLine = ActiveDocument.Background.Line

LockAnchor true if the anchor of a Shape object is locked to the anchoring range.

ActiveDocument.Background.LockAnchor =

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.

ActiveDocument.Background.LockAspectRatio =

Model3D returns a Model3DFormat object that contains Model3D properties.

Dim mdfModel3D As Model3DFormat
Set mdfModel3D = ActiveDocument.Background.Model3D

Name returns or sets the name of the specified object.

ActiveDocument.Background.Name =

Nodes returns a ShapeNodes collection that represents the geometric description of the specified shape.

Dim snsNodes As ShapeNodes
Set snsNodes = ActiveDocument.Background.Nodes

Parent returns an object that represents the parent object of the specified Shape object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.Parent

ParentGroup returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.

Dim shpParentGroup As Shape
Set shpParentGroup = ActiveDocument.Background.ParentGroup

PictureFormat returns a PictureFormat object that contains picture formatting properties for the specified object.

Dim pftPictureFormat As PictureFormat
Set pftPictureFormat = ActiveDocument.Background.PictureFormat

Reflection returns a ReflectionFormat object that represents the reflection formatting for a shape.

Dim rftReflection As ReflectionFormat
Set rftReflection = ActiveDocument.Background.Reflection

RelativeHorizontalPosition specifies to the relative horizontal position of a shape.

ActiveDocument.Background.RelativeHorizontalPosition = wdRelativeHorizontalPositionCharacter

RelativeHorizontalSize returns or sets a WdRelativeVerticalSize constant that represents the object to which a range of shapes is relative.

ActiveDocument.Background.RelativeHorizontalSize = wdRelativeHorizontalSizeInnerMarginArea

RelativeVerticalPosition specifies the relative vertical position of a shape.

ActiveDocument.Background.RelativeVerticalPosition = wdRelativeVerticalPositionBottomMarginArea

RelativeVerticalSize returns or sets a WdRelativeVerticalSize constant that represents the relative vertical size of a shape.

ActiveDocument.Background.RelativeVerticalSize = wdRelativeVerticalSizeBottomMarginArea

Rotation returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation.

ActiveDocument.Background.Rotation =

Script returns a Script object, which represents a block of script or code for an image on a webpage.

Dim scrScript As Office.Script
scrScript = ActiveDocument.Background.Script

Shadow returns a ShadowFormat object that represents the shadow formatting for the specified shape.

Dim sftShadow As ShadowFormat
Set sftShadow = ActiveDocument.Background.Shadow

SmartArt returns a SmartArt object that provides a way to work with the SmartArt associated with the specified shape.

Dim satSmartArt As Office.SmartArt
Set satSmartArt = ActiveDocument.Background.SmartArt

SoftEdge returns a SoftEdgeFormat object that represents the soft edge formatting for a shape.

Dim sefSoftEdge As SoftEdgeFormat
Set sefSoftEdge = ActiveDocument.Background.SoftEdge

TextEffect returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape.

Dim tefTextEffect As TextEffectFormat
Set tefTextEffect = ActiveDocument.Background.TextEffect

TextFrame returns a TextFrame object that contains the text for the specified shape.

Dim tfeTextFrame As TextFrame
Set tfeTextFrame = ActiveDocument.Background.TextFrame

TextFrame2 returns a TextFrame2 object that contains the text for the specified shape.

Dim tf2TextFrame2 As Office.TextFrame2
Set tf2TextFrame2 = ActiveDocument.Background.TextFrame2

ThreeD returns a ThreeDFormat object that contains 3D formatting properties for the specified shape.

Dim tdfThreeD As ThreeDFormat
Set tdfThreeD = ActiveDocument.Background.ThreeD

Title returns or sets a String that contains a title for the specified shape.

ActiveDocument.Background.Title =

Top returns or sets the vertical position of the specified shape or shape range in points.

ActiveDocument.Background.Top =

TopRelative returns or sets a Single that represents the relative top position of a shape.

ActiveDocument.Background.TopRelative =

Type returns the type of inline shape.

Dim mstType As Office.MsoShapeType
mstType = ActiveDocument.Background.Type

VerticalFlip true if the specified shape is flipped around the vertical axis.

Dim mtsVerticalFlip As Office.MsoTriState
mtsVerticalFlip = ActiveDocument.Background.VerticalFlip

Vertices returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs.

Dim varVertices As Variant
varVertices = ActiveDocument.Background.Vertices

Width returns or sets the width, in points, of the specified shape.

ActiveDocument.Background.Width =

ShapeRange.Adjustments returns an Adjustments object that contains adjustment values for all the adjustments in the specified ShapeRange object that represents an AutoShape or WordArt.

Dim sre As ShapeRange: Set sre =  
Dim adjsAdjustments As Adjustments
Set adjsAdjustments = sre.Adjustments

ShapeRange.AlternativeText returns or sets the alternative text associated with a shape in a webpage.

Dim sre As ShapeRange: Set sre =  
sre.AlternativeText =

ShapeRange.Anchor returns a Range object that represents the anchoring range for the specified shape range.

Dim sre As ShapeRange: Set sre =  
Dim rngAnchor As Range
Set rngAnchor = sre.Anchor

ShapeRange.AutoShapeType returns or sets the shape type for the specified ShapeRange object, which must represent an AutoShape other than a line or freeform drawing.

Dim sre As ShapeRange: Set sre =  
sre.AutoShapeType =

ShapeRange.Callout returns a CalloutFormat object that contains callout formatting properties for the specified shape.

Dim sre As ShapeRange: Set sre =  
Dim cftCallout As CalloutFormat
Set cftCallout = sre.Callout

ShapeRange.CanvasItems returns a CanvasShapes object that represents a collection of shapes in a drawing canvas.

Dim sre As ShapeRange: Set sre =  
Dim cssCanvasItems As CanvasShapes
Set cssCanvasItems = sre.CanvasItems

ShapeRange.Child true if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent.

Dim sre As ShapeRange: Set sre =  
Dim mtsChild As Office.MsoTriState
mtsChild = sre.Child

ShapeRange.Count returns a Long that represents the number of shapes in the collection.

Dim sre As ShapeRange: Set sre =  
Dim lngCount As Long
lngCount = sre.Count

ShapeRange.Decorative sets or returns the decorative flag for the specified object.

Dim sre As ShapeRange: Set sre =  
sre.Decorative =

ShapeRange.Fill returns a FillFormat object that contains fill formatting properties for the specified shape.

Dim sre As ShapeRange: Set sre =  
Dim fftFill As FillFormat
Set fftFill = sre.Fill

ShapeRange.Glow returns a GlowFormat object that represents the glow formatting for a range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim gftGlow As GlowFormat
Set gftGlow = sre.Glow

ShapeRange.GroupItems returns a GroupShapes object that represents the individual shapes in the specified group.

Dim sre As ShapeRange: Set sre =  
Dim gssGroupItems As GroupShapes
Set gssGroupItems = sre.GroupItems

ShapeRange.Height returns or sets the height of the specified shape range.

Dim sre As ShapeRange: Set sre =  
sre.Height =

ShapeRange.HorizontalFlip indicates that a range of shapes has been flipped horizontally.

Dim sre As ShapeRange: Set sre =  
Dim mtsHorizontalFlip As Office.MsoTriState
mtsHorizontalFlip = sre.HorizontalFlip

ShapeRange.Hyperlink returns a Hyperlink object that represents the hyperlink associated with the specified ShapeRange object.

Dim sre As ShapeRange: Set sre =  
Dim hypHyperlink As Hyperlink
Set hypHyperlink = sre.Hyperlink

ShapeRange.ID returns the identification type for the range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim lngID As Long
lngID = sre.ID

ShapeRange.Left returns or sets a Single that represents the horizontal position, measured in points, of the specified range of shapes. Can also be any valid WdShapePosition constant.

Dim sre As ShapeRange: Set sre =  
sre.Left =

ShapeRange.LeftRelative returns or sets a Single that represents the relative left position of a range of shapes.

Dim sre As ShapeRange: Set sre =  
sre.LeftRelative =

ShapeRange.Line returns a LineFormat object that contains line formatting properties for the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim lftLine As LineFormat
Set lftLine = sre.Line

ShapeRange.LockAnchor true if the anchor for the specified ShapeRange object is locked to the anchoring range.

Dim sre As ShapeRange: Set sre =  
sre.LockAnchor =

ShapeRange.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.

Dim sre As ShapeRange: Set sre =  
sre.LockAspectRatio =

ShapeRange.Model3D returns a Model3DFormat object that contains Model3D properties.

Dim sre As ShapeRange: Set sre =  
Dim mdfModel3D As Model3DFormat
Set mdfModel3D = sre.Model3D

ShapeRange.Name returns or sets the name of the specified object.

Dim sre As ShapeRange: Set sre =  
sre.Name =

ShapeRange.Nodes returns a ShapeNodes collection that represents the geometric description of the specified shape.

Dim sre As ShapeRange: Set sre =  
Dim snsNodes As ShapeNodes
Set snsNodes = sre.Nodes

ShapeRange.Parent returns an object that represents the parent object of the specified ShapeRange object.

Dim sre As ShapeRange: Set sre =  
Dim objParent As Object
Set objParent = sre.Parent

ShapeRange.ParentGroup returns a Shape object that represents the common parent shape of a range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim shpParentGroup As Shape
Set shpParentGroup = sre.ParentGroup

ShapeRange.PictureFormat returns a PictureFormat object that contains picture formatting properties for the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim pftPictureFormat As PictureFormat
Set pftPictureFormat = sre.PictureFormat

ShapeRange.Reflection returns a ReflectionFormat object that represents the reflection formatting for a range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim rftReflection As ReflectionFormat
Set rftReflection = sre.Reflection

ShapeRange.RelativeHorizontalPosition specifies the relative horizontal position of a range of shapes.

Dim sre As ShapeRange: Set sre =  
sre.RelativeHorizontalPosition = wdRelativeHorizontalPositionCharacter

ShapeRange.RelativeHorizontalSize returns or sets a WdRelativeHorizontalSize constant that represents the object to which a range of shapes is relative.

Dim sre As ShapeRange: Set sre =  
sre.RelativeHorizontalSize = wdRelativeHorizontalSizeInnerMarginArea

ShapeRange.RelativeVerticalPosition specifies the relative vertical position of a range of shapes.

Dim sre As ShapeRange: Set sre =  
sre.RelativeVerticalPosition = wdRelativeVerticalPositionBottomMarginArea

ShapeRange.RelativeVerticalSize returns or sets a WdRelativeVerticalSize constant that represents the object to which a range of shapes is relative.

Dim sre As ShapeRange: Set sre =  
sre.RelativeVerticalSize = wdRelativeVerticalSizeBottomMarginArea

ShapeRange.Rotation returns or sets the number of degrees the specified shape is rotated around the z-axis.

Dim sre As ShapeRange: Set sre =  
sre.Rotation =

ShapeRange.Shadow returns a ShadowFormat object that represents the shadow formatting for the specified shape.

Dim sre As ShapeRange: Set sre =  
Dim sftShadow As ShadowFormat
Set sftShadow = sre.Shadow

ShapeRange.SoftEdge returns a SoftEdgeFormat object that represents the soft edge formatting for a range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim sefSoftEdge As SoftEdgeFormat
Set sefSoftEdge = sre.SoftEdge

ShapeRange.TextEffect returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape.

Dim sre As ShapeRange: Set sre =  
Dim tefTextEffect As TextEffectFormat
Set tefTextEffect = sre.TextEffect

ShapeRange.TextFrame returns a TextFrame object that contains the text for the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim tfeTextFrame As TextFrame
Set tfeTextFrame = sre.TextFrame

ShapeRange.TextFrame2 returns a TextFrame2 object that contains the text for the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim tf2TextFrame2 As Office.TextFrame2
Set tf2TextFrame2 = sre.TextFrame2

ShapeRange.ThreeD returns a ThreeDFormat object that contains 3D formatting properties for the specified range of shapes.

Dim sre As ShapeRange: Set sre =  
Dim tdfThreeD As ThreeDFormat
Set tdfThreeD = sre.ThreeD

ShapeRange.Title returns or sets a String that contains a title for the shapes in the specified shape range.

Dim sre As ShapeRange: Set sre =  
sre.Title =

ShapeRange.Top returns or sets the vertical position of the specified shape or shape range in points.

Dim sre As ShapeRange: Set sre =  
sre.Top =

ShapeRange.TopRelative returns or sets a Single that represents the relative top position of a range of shapes.

Dim sre As ShapeRange: Set sre =  
sre.TopRelative =

ShapeRange.Type returns the shape type.

Dim sre As ShapeRange: Set sre =  
Dim mstType As Office.MsoShapeType
mstType = sre.Type

ShapeRange.VerticalFlip true if the specified shape is flipped around the vertical axis.

Dim sre As ShapeRange: Set sre =  
Dim mtsVerticalFlip As Office.MsoTriState
mtsVerticalFlip = sre.VerticalFlip

ShapeRange.Vertices returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. You can use the array returned by this property as an argument for the AddCurve or AddPolyLine method.

Dim sre As ShapeRange: Set sre =  
Dim varVertices As Variant
varVertices = sre.Vertices

ShapeRange.Width returns or sets the width, in points, of the shapes within the range.

Dim sre As ShapeRange: Set sre =  
sre.Width =

Shapes.Count returns a Long that represents the number of shapes in the collection.

Dim lngCount As Long
lngCount = Selection.HeaderFooter.Shapes.Count

Shapes.Parent returns an object that represents the parent object of the specified Shapes object.

Dim objParent As Object
Set objParent = Selection.HeaderFooter.Shapes.Parent