Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

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.

Signature
C#
C#
 public boolean MergeStylesFromTemplate{ get; set; }
Signature
vb.net
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

Example
Code Block
csharp
csharp
titleC#

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

          //--- Set MergeStylesFromTemplate
          oDocument.MergeStylesFromTemplate = true;
        
Code Block
vb.net
vb.net
titlevb.net

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

          '--- Set MergeStylesFromTemplate
          oDocument.MergeStylesFromTemplate = True