Expand Minimize
This topic has not yet been rated - Rate this topic

Document.SetDefaultTableStyle Method (Word)

Published: July 16, 2012

Specifies the table style to use for newly created tables in a document.

expression .SetDefaultTableStyle(Style, SetInTemplate)

expression Required. A variable that represents a Document object.

Parameters

Name

Required/Optional

Data Type

Description

Style

Required

Variant

A string specifying the name of the style.

SetInTemplate

Required

Boolean

True to save the table style in the template attached to the document.

This example checks to see if the default table style used in the active document is named Table Normal and, if it is, changes the default table style to TableStyle1. This example assumes that you have a table style named TableStyle1.

Sub TableDefaultStyle() 
 With ActiveDocument 
 If .DefaultTableStyle = "Table Normal" Then 
 .SetDefaultTableStyle Style:="TableStyle1", _ 
 SetInTemplate:=True 
 End If 
 End With 
End Sub

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.