Share via


TableView.GridLineStyle Property

Outlook Developer Reference

Returns or sets an OlGridLineStyle constant that represents the line style used for grid lines in the TableView object. Read/write.

Version Information
 Version Added:  Outlook 2007

Syntax

expression.GridLineStyle

expression   A variable that represents a TableView object.

Example

The following Visual Basic for Applications (VBA) example sets the GridLineStyle property of the current TableView object to display the grid with small dotted lines.

Visual Basic for Applications
  Private Sub SetDottedGridLines()
    Dim objTableView As TableView
    
    If Application.ActiveExplorer.CurrentView.ViewType = _
        olTableView Then
        
        ' Obtain a TableView object reference for the
        ' current table view.
        Set objTableView = _
            Application.ActiveExplorer.CurrentView
        
        With objTableView
            ' Set the GridLineStyle property so that
            ' the grid in the table view are
            ' displayed with thin dotted lines.
            .GridLineStyle = olGridLineSmallDots
            
            ' Save the table view.
            .Save
        End With
    End If
End Sub

See Also