Page tree

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
Wiki Markup
{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.{excerpt}
{signature:C#}
 public boolean MergeStylesFromTemplate{ get; set; }
{signature}{signature:vb.net}
Public Property MergeStylesFromTemplate() As Boolean
{signature}
{remarks}The default value for a new [Document|Document] is {{false}}.

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

{remarks}
{example}{code:csharp|title=C#}

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

          //--- Set MergeStylesFromTemplate
          oDocument.MergeStylesFromTemplate = true;
        {code}
{code:vb.net|title=vb.net}

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

          '--- Set MergeStylesFromTemplate
          oDocument.MergeStylesFromTemplate = True
        {code}

{example}