Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1.4 KB

Word.Document.SetDefaultTableStyle.md

File metadata and controls

57 lines (36 loc) · 1.4 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Document.SetDefaultTableStyle method (Word)
vbawd10.chm158007662
vbawd10.chm158007662
Word.Document.SetDefaultTableStyle
6e932b12-6af8-af0a-5c3b-c74cefaf0d35
06/08/2017
medium

Document.SetDefaultTableStyle method (Word)

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

Syntax

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.

Example

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

See also

Document Object

[!includeSupport and feedback]