TableView.GridLineStyle property (Outlook)

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


expression. GridLineStyle

expression A variable that represents a TableView object.


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.

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 = _ 
 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. 
 End With 
 End If 
End Sub

See also

TableView Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.