Xceed Words for .NET v3.0 Documentation
DocX Class
Members  Example 


Xceed.Words.NET Assembly > Xceed.Words.NET Namespace : DocX Class
Represents a DocX document.
Syntax
'Declaration
 
Public Class DocX 

   Inherits Xceed.Document.NET.Document
'Usage
 
Dim instance As DocX
public class DocX : Xceed.Document.NET.Document 
Example
// Add the SignatureLine to the document.

mySignatureLine = document.AddSignatureLine();



// Insert the SignatureLine in a document's paragraph.

myParagraph.AppendSignatureLine( mySignatureLine );



// Create a digital certificate in order to sign the document, by using a pfx file and its password.

var certificate = DigitalCertificate.Create( "CustomCertificate.pfx", "xceed" );



// Create SignOptions for the SignatureLine.

// Use the SignatureLineId to match the SignatureLine id and set the image used to sign the SignatureLine.

var signOptions = new SignOptions()

{

  SignatureLineId = mySignatureLine.Id,

  SignatureLineImage = "MarkStoneSignature.png",

  Comments = "This document is now signed by Mark Stone."

};   



// Sign the document with the certificate and the SignOptions, related to the SignatureLine.

DocX.Sign( "DocumentToSign.docx", "SignedDocument.docx", certificate, signOptions );
Inheritance Hierarchy

System.Object
   Xceed.Document.NET.DocumentElement
      Xceed.Document.NET.Container
         Xceed.Document.NET.Document
            Xceed.Words.NET.DocX

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows 11, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DocX Members
Xceed.Words.NET Namespace