alexa
menu

Document Processing

    Show / Hide Table of Contents

    WordRevisionAgentTools Class

    Provides agent tools for managing tracked changes (revisions) in Word documents. Handles accepting, rejecting, and querying document revisions.

    Inheritance
    System.Object
    AgentToolBase
    AgentToolBase<WordDocument>
    WordRevisionAgentTools
    Inherited Members
    AgentToolBase<WordDocument>.InMemoryManager
    AgentToolBase<WordDocument>.Mode
    AgentToolBase<WordDocument>.OpenDocument(String, String)
    AgentToolBase<WordDocument>.SaveDocument(String, WordDocument)
    AgentToolBase<WordDocument>.SaveFile(String, Stream)
    AgentToolBase<WordDocument>.StorageManager
    AgentToolBase.GetTools()
    Namespace: Syncfusion.AI.AgentTools.Word
    Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
    Syntax
    public class WordRevisionAgentTools : AgentToolBase<WordDocument>

    Constructors

    WordRevisionAgentTools(DocumentStorageManager)

    Initializes a new instance of the WordRevisionAgentTools class (Mode 2 — DocumentStorage).

    Declaration
    public WordRevisionAgentTools(DocumentStorageManager manager)
    Parameters
    Type Name Description
    DocumentStorageManager manager

    The document storage manager.

    WordRevisionAgentTools(WordDocumentManager)

    Initializes a new instance of the WordRevisionAgentTools class (Mode 1 — InMemory).

    Declaration
    public WordRevisionAgentTools(WordDocumentManager manager)
    Parameters
    Type Name Description
    WordDocumentManager manager

    The document manager for managing Word documents.

    Methods

    AcceptAllRevisions(String, String)

    Accepts all revisions in a Word document.

    Declaration
    [Tool(Name = "AcceptAllRevisions", Description = "Accepts all revisions in the document and returns count.")]
    public AgentToolResult AcceptAllRevisions([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
    Parameters
    Type Name Description
    System.String documentIdOrFilePath

    The document ID (InMemory mode) or input file path (DocumentStorage mode) of the document containing the TOC to update.

    System.String outputFilePath

    Output file path for saving the result (DocumentStorage mode only).

    Returns
    Type Description
    AgentToolResult

    Result indicating whether the revision acceptance was completed successfully.

    AcceptRevisionsByAuthor(String, String, String)

    Accepts all revisions made by a specific author.

    Declaration
    [Tool(Name = "AcceptRevisionsByAuthor", Description = "Accepts all tracked change revisions made by a specific author in the Word document. documentIdOrFilePath: The document ID (InMemory mode) or input file path (DocumentStorage mode).")]
    public AgentToolResult AcceptRevisionsByAuthor([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "The name of the author whose revisions should be accepted")] string author, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
    Parameters
    Type Name Description
    System.String documentIdOrFilePath

    The document ID (InMemory mode) or input file path (DocumentStorage mode) of the document containing the TOC to update.

    System.String author

    The name of the author whose tracked revisions should be accepted.

    System.String outputFilePath

    Output file path for saving the result (DocumentStorage mode only).

    Returns
    Type Description
    AgentToolResult

    Result indicating whether the revision acceptance was completed successfully.

    RejectAllRevisions(String, String)

    Rejects all revisions in a Word document.

    Declaration
    [Tool(Name = "RejectAllRevisions", Description = "Rejects all revisions in the document and returns count.")]
    public AgentToolResult RejectAllRevisions([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
    Parameters
    Type Name Description
    System.String documentIdOrFilePath

    The document ID (InMemory mode) or input file path (DocumentStorage mode) of the document containing the TOC to update.

    System.String outputFilePath

    Output file path for saving the result (DocumentStorage mode only).

    Returns
    Type Description
    AgentToolResult

    Result indicating whether the revision rejection was completed successfully.

    RejectRevisionsByAuthor(String, String, String)

    Rejects all revisions made by a specific author.

    Declaration
    [Tool(Name = "RejectRevisionsByAuthor", Description = "Rejects all tracked change revisions made by a specific author in the Word document. documentIdOrFilePath: The document ID (InMemory mode) or input file path (DocumentStorage mode).")]
    public AgentToolResult RejectRevisionsByAuthor([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "The name of the author whose revisions should be rejected")] string author, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
    Parameters
    Type Name Description
    System.String documentIdOrFilePath

    The document ID (InMemory mode) or input file path (DocumentStorage mode).

    System.String author

    The name of the author whose tracked revisions should be rejected.

    System.String outputFilePath

    Output file path for saving the result (DocumentStorage mode only).

    Returns
    Type Description
    AgentToolResult

    Result indicating whether the revision rejection was completed successfully.

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