Parent Property Example

This example sets the variable myObject to the parent object of the Bookmarks object. The message box displays the object type name of myObject (Document).

Set myObject = ActiveDocument.Bookmarks.Parent
MsgBox TypeName(myObject)

This example sets the variable myRange to cell one in table one in the active document. The width of this cell is changed to 36 points, and border formatting is removed from the table.

Set myRange = ActiveDocument.Tables(1).Cell(1, 1)
With myRange
    .SetWidth ColumnWidth:=36, RulerStyle:=wdAdjustNone
    .Parent.Borders.Enable = False
End With