Skip to end of metadata
Go to start of metadata

Description

Sets or returns a boolean representing if Word will update the styles in the current document to match the styles in the attached Word template (i.e. Normal.dot) each time you open the document in Word. This should be set to true when you want to ensure that your document contains up-to-date style formatting.

C#
 public boolean MergeStylesFromTemplate{ get; set; }
vb.net
Public Property MergeStylesFromTemplate() As Boolean

Remarks

The default value for a new Document is false.

MS Word equivalent: Tools menu > Templates and Add-ins... > Document template section > Automatically update document styles

Examples

C#

          //--- Return MergeStylesFromTemplate
          bool mergeStyles = oDocument.MergeStylesFromTemplate;

          //--- Set MergeStylesFromTemplate
          oDocument.MergeStylesFromTemplate = true;
        
vb.net

          '--- Return MergeStylesFromTemplate
          Dim mergeStyles As Boolean = oDocument.MergeStylesFromTemplate

          '--- Set MergeStylesFromTemplate
          oDocument.MergeStylesFromTemplate = True
        
  • No labels