FileVerbs API Documentation - Word Manipulation

Word Manipulation

Word Manipulation Features

FileVerbs enables manipulation of Word documents including comment handling, watermarking, merging, page range selection, text replacement, and removing blank pages. These actions help tailor Word content programmatically for editing, analysis, or cleanup.

Supported Word Manipulation Actions

WordAddComment

Add comments to specific text, paragraph, or matching pattern inside a Word document.

Priority is given in this order: regexMatch > textMatch > paragraphIndex. Only one is required.

{
  "action": "wordaddcomment",
  "parameters": {
    "fileIds": ["your_file_id_here"],
    "options": {
      "wordCommentSettings": [
        {
          "paragraphIndex": 2,
          "textMatch": "Important",
          "commentText": "Please review this section.",
          "author": "Admin",
          "initials": "AD"
        }
      ]
    }
  }
}

WordDeleteComment

Delete all comments, specific ones by content match, or those on a given page.

{
  "action": "worddeletecomment",
  "parameters": {
    "fileIds": ["your_file_id_here"],
    "options": {
      "commentDeletionSettings": {
        "deleteAll": true
      }
    }
  }
}

Delete by Text Match

{
  "action": "worddeletecomment",
  "parameters": {
    "fileIds": ["your_file_id_here"],
    "options": {
      "commentDeletionSettings": {
        "textContains": "TODO"
      }
    }
  }
}

Delete by Page

{
  "action": "worddeletecomment",
  "parameters": {
    "fileIds": ["your_file_id_here"],
    "options": {
      "commentDeletionSettings": {
        "page": 2
      }
    }
  }
}

WordAddWatermark

Embed a text watermark across all pages.

{
  "action": "wordaddwatermark",
  "parameters": {
    "fileIds": ["your_file_id_here"],
    "options": {
      "watermarkSettings": {
        "text": "Confidential",
        "fontName": "Arial",
        "foregroundColor": "#808080",
        "rotation": 45,
        "isBackground": true
      }
    }
  }
}

WordPageRange

Extract specific pages from a Word document.

{
  "action": "wordpagerange",
  "parameters": {
    "fileIds": ["your_file_id_here"],
    "options": {
      "startPageIndex": 1,
      "pageCount": 3
    }
  }
}

WordSplitter

Split a Word document into individual pages as separate DOCX files.

{
  "action": "wordsplitter",
  "parameters": {
    "fileIds": ["your_file_id_here"]
  }
}

WordRemoveBlankPages

Remove empty or whitespace-only pages from the document.

Blank pages are identified based on absence of text or meaningful content.

{
  "action": "wordremoveblankpages",
  "parameters": {
    "fileIds": ["your_file_id_here"]
  }
}

WordMergeMultipleFiles

Merge multiple Word files into a single document.

Note: Files will be merged in the order listed in fileIds.

{
  "action": "wordmergemultiplefiles",
  "parameters": {
    "fileIds": ["file_id_1", "file_id_2", "file_id_3"]
  }
}