Propriedade RulerGuide. Parent (Publisher)RulerGuide.Parent property (Publisher)
Retorna um objeto que representa o objeto pai do objeto especificado.Returns an object that represents the parent object of the specified object. Por exemplo, para um objeto TextFrame, retorna um objeto Shape que representa a forma pai do quadro de texto.For example, for a TextFrame object, returns a Shape object representing the parent shape of the text frame. Somente leitura.Read-only.
SintaxeSyntax
expressão. Paiexpression.Parent
expressão Uma variável que representa um objeto RulerGuide .expression A variable that represents a RulerGuide object.
ExemploExample
Este exemplo acessa o objeto pai da forma selecionada e, em seguida, adiciona uma nova forma a ele e configura o preenchimento para a nova forma.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
Este exemplo retorna o objeto pai de um quadro de texto, que é a primeira forma na publicação ativa e, em seguida, preenche a forma com um padrão.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
Suporte e comentáriosSupport and feedback
Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação?Have questions or feedback about Office VBA or this documentation? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.