alexa
menu

Document Processing

    Show / Hide Table of Contents

    WordDocumentManager Class

    Manager for handling Word documents in memory during AI agent operations. Provides document lifecycle management with automatic cleanup.

    Inheritance
    System.Object
    DocumentManagerBase<WordDocument>
    WordDocumentManager
    Implements
    IDocumentManager
    Inherited Members
    DocumentManagerBase<WordDocument>.ImportDocument(WordDocument)
    Namespace: Syncfusion.AI.AgentTools.Word
    Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
    Syntax
    public class WordDocumentManager : DocumentManagerBase<WordDocument>, IDocumentManager

    Constructors

    WordDocumentManager(Nullable<TimeSpan>)

    Initializes a new instance of the WordDocumentManager class.

    Declaration
    public WordDocumentManager(Nullable<TimeSpan> expirationTime = null)
    Parameters
    Type Name Description
    System.Nullable<System.TimeSpan> expirationTime

    Time before documents are automatically cleaned up. Default is 30 minutes.

    Properties

    DocumentIdPrefix

    Gets the prefix used for generating unique document identifiers.

    Declaration
    protected override string DocumentIdPrefix { get; }
    Property Value
    Type Description
    System.String

    The prefix string "doc_" used for Word document IDs.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.DocumentIdPrefix

    DocumentType

    Gets the document type managed by this manager.

    Declaration
    public override DocumentType DocumentType { get; }
    Property Value
    Type Description
    DocumentType

    DocumentType.Word indicating this manager handles Word documents.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.DocumentType

    Methods

    CloseDocument(WordDocument)

    Closes and releases the resources associated with the Word document.

    Declaration
    protected override void CloseDocument(WordDocument document)
    Parameters
    Type Name Description
    WordDocument document

    The WordDocument instance to close.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.CloseDocument(Syncfusion.DocIO.DLS.WordDocument)

    CreateDocumentInstance()

    Creates a new empty Word document instance.

    Declaration
    protected override WordDocument CreateDocumentInstance()
    Returns
    Type Description
    WordDocument

    A new WordDocument instance ready for editing.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.CreateDocumentInstance()

    Dispose()

    Disposes the Word Document Manager and it's documents.

    Declaration
    public void Dispose()

    ExportDocumentInstance(WordDocument, String)

    Exports the Word document to the specified file path.

    Declaration
    protected override void ExportDocumentInstance(WordDocument document, string filePath)
    Parameters
    Type Name Description
    WordDocument document

    The WordDocument instance to export.

    System.String filePath

    The file path where the document will be saved.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.ExportDocumentInstance(Syncfusion.DocIO.DLS.WordDocument, System.String)

    ImportDocumentInstance(String)

    Imports an existing Word document from the specified file path.

    Declaration
    protected override WordDocument ImportDocumentInstance(string filePath)
    Parameters
    Type Name Description
    System.String filePath

    The file path to the Word document to load.

    Returns
    Type Description
    WordDocument

    A WordDocument instance loaded from the specified file.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.ImportDocumentInstance(System.String)

    ImportDocumentInstance(String, String)

    Imports an encrypted Word document from the specified file path using the provided password.

    Declaration
    protected override WordDocument ImportDocumentInstance(string filePath, string password)
    Parameters
    Type Name Description
    System.String filePath

    The file path to the encrypted Word document.

    System.String password

    The password required to open the encrypted document.

    Returns
    Type Description
    WordDocument

    A WordDocument instance loaded from the specified file with decryption applied.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.DocIO.DLS.WordDocument>.ImportDocumentInstance(System.String, System.String)

    Implements

    IDocumentManager
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved