HeaderFooter.Shapes Property (Word)

Returns a Shapes collection that represents all the Shape objects in a header or footer. Read-only.

Syntax

expression .Shapes

expression A variable that represents a HeaderFooter object.

Remarks

This collection can contain drawings, shapes, pictures, OLE objects, ActiveX controls, text objects, and callouts. For information about returning a single member of a collection, see Returning an Object from a Collection.

The Shapes property, when applied to a document, returns all the Shape objects in the main story of the document, excluding the headers and footers. When applied to a HeaderFooter object, the Shapes property returns all the Shape objects found in all the headers and footers in the document.

Example

This example displays a count of all the shapes in the primary header and footer of the first section of the active document.

MsgBox ActiveDocument.Sections(1). _ 
 Headers(wdHeaderFooterPrimary).Shapes.Count

See Also

Concepts

HeaderFooter Object Members

HeaderFooter Object