ReaderSpread.Parent 屬性 (Publisher)ReaderSpread.Parent property (Publisher)

會傳回代表所指定物件之父物件的物件。Returns an object that represents the parent object of the specified object. 例如,若為 TextFrame 物件,會傳回代表文字框之父圖形的 Shape 物件。For example, for a TextFrame object, returns a Shape object representing the parent shape of the text frame. 唯讀。Read-only.



_運算式_代表**ReaderSpread** 物件的變數。expression A variable that represents a ReaderSpread object.


本範例存取選取圖案的父物件,然後將新圖案加入其中,再設定新圖案的填滿。This example accesses the parent object of the selected shape, and then adds a new shape to it and sets the fill for the new shape.

Sub ParentObject() 
 Dim shp As Shape 
 Dim pg As Page 
 Set pg = Selection.ShapeRange(1).Parent 
 Set shp = pg.Shapes.AddShape(Type:=msoShape5pointStar, _ 
 Left:=72, Top:=72, Width:=72, Height:=72) 
 shp.Fill.ForeColor.RGB = RGB(Red:=180, Green:=180, Blue:=180) 
End Sub

本範例會先傳回文字框的父物件,也就是使用中出版物的第一個圖案,然後使用圖樣來填滿圖案。This example returns the parent object of a text frame, which is the first shape in the active publication, and then fills the shape with a pattern.

Sub ParentShape() 
 Dim shpParent As Shape 
 Set shpParent = ActiveDocument.Pages(1).Shapes(1).TextFrame.Parent 
 shpParent.Fill.Patterned Pattern:=msoPatternSphere 
End Sub

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.