Document.Shapes property (Word)
Returns a Shapes collection that represents all the Shape objects in the specified document. Read-only.
Syntax
expression.Shapes
expression A variable that represents a Document 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.
Example
This example creates a new document, adds a rectangle to it that's 100 points wide and 50 points high, and sets the upper-left corner of the rectangle to be 5 points from the left edge and 25 points from the upper-left corner of the page.
Set myDoc = Documents.Add
myDoc.Shapes.AddShape msoShapeRectangle, 5, 25, 100, 50
This example sets the fill texture for all the shapes in the active document.
For Each s in ActiveDocument.Shapes
s.Fill.PresetTextured msoTextureOak
Next s
This example adds a shadow to the first shape in the active document.
Set myShape = ActiveDocument.Shapes(1)
myShape.Shadow.Type = msoShadow6
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기