Visual Basic (Declaration) | |
---|---|
Public Class DocxDocumentOptions Inherits DocumentOptions |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public class DocxDocumentOptions : DocumentOptions |
C++/CLI | |
---|---|
public ref class DocxDocumentOptions : public DocumentOptions |
This example will create a new Microsoft Word document (DOCX) file using the various supported options.
Visual Basic | Copy Code |
---|---|
' Windows API functions needed to load/delete an EMF |
C# | Copy Code |
---|---|
// Windows API functions needed to load/delete an EMF |
The options set in the DocxDocumentOptions class will be used when the user saves a document using the DocumentFormat.Docx format.
To change the options used with the DOCX format, perform the following steps:
Use the DocumentWriter.GetOptions method of the DocumentWriter object being used passing DocumentFormat.Docx to the Format parameter. Note that the resulting object from the base DocumentOptions class needs to be cast to DocxDocumentOptions. Use the various DocxDocumentOptions properties to change the options. Use DocumentWriter.SetOptions to set the new options in the engine. Now you can call the DocumentWriter.BeginDocument method (with DocumentFormat.Docx for the format parameter) to create a new document and add the pages.
The DocxDocumentOptions class contains the following properties:
Property | Description |
---|---|
DocxDocumentOptions.Framed | Turn off or on the option to put the text blocks inside a frame (text box object) in the resulting DOCX file. |
This format requires .NET framework 3.0 and Microsoft Open XML Format SDK 1.0. The Microsoft Open XML Format SDK requires Windows Server 2003, Windows Vista or Windows XP Service Pack 2. For more information, refer to .
System.Object
Leadtools.Forms.DocumentWriters.DocumentOptions
Leadtools.Forms.DocumentWriters.DocxDocumentOptions
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family