Visible Property Example

This example hides Word.

Application.Visible = False

This example hides the Calculator, if it's running. If it's not running, a message is displayed.

If Tasks.Exists("Calculator") Then
    Tasks("Calculator").Visible = False
Else
    Msgbox "Calculator is not running."
End If

This example creates a table in the active document and removes the default borders from the table.

Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
    NumRows:=12, NumColumns:=5)
For Each aBorder In myTable.Borders
    aBorder.Visible = False
Next aBorder

This example hides the shadow formatting for the first shape in the active document.

ActiveDocument.Shapes(1).Shadow.Visible = False

This example creates a new document, and then adds text and a rectangle to it. The example also sets Word to hide the rectangle while the document is being printed and then make it visible again after printing is completed.

Set myDoc = Documents.Add
Selection.TypeText Text:="This is some sample text."
With myDoc
    .Shapes.AddShape msoShapeRectangle, 200, 70, 150, 60
    .Shapes(1).Visible = False
    .PrintOut
    .Shapes(1).Visible = True
End With