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 that represents whether or not WordWriter will preserve feature of an existing document that it does not natively support. Setting this to false can result in smaller file sizes, but features that are not natively supported by WordWriter will be stripped out.  This is set to true by default.{excerpt}
{signature:C#}
 public boolean Preserve{ get; set; }
{signature}{signature:vb.net}
Public Property Preserve() As Boolean
{signature}
{remarks}The main advantage to setting the {{preserve}} property to false is that it can significantly reduce the file size of the resulting Word document. This is recommended if it is known that only supported features are in the document, especially when creating large documents.

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

          //--- Return Preserve
          bool preserve = oWordApplication.Preserve;

          //--- Set Preserve
          oWordApplication.Preserve = false;
        {code}
{code:vb.net|title=vb.net}

          '--- Return Preserve
          Dim preserve As Boolean = oWordApplication.Preserve

          '--- Set Preserve
          oWordApplication.Preserve = False
        {code}

{example}