LoadOptionsLoadFormat Property

Specifies the format of the document to be loaded. Default is Auto.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public LoadFormat LoadFormat { get; set; }

Property Value

Type: LoadFormat
Remarks

It is recommended that you specify the Auto value and let Aspose.Words detect the file format automatically. If you know the format of the document you are about to load, you can specify the format explicitly and this will slightly reduce the loading time by the overhead associated with auto detecting the format. If you specify an explicit load format and it will turn out to be wrong, the auto detection will be invoked and a second attempt to load the file will be made.

Examples
Explicitly loads a document as HTML without automatic file format detection.
LoadOptions loadOptions = new LoadOptions();
loadOptions.LoadFormat = Aspose.Words.LoadFormat.Html;

Document doc = new Document(MyDir + "Document.html", loadOptions);
See Also