@uipath/delegate-sdk 1.203.1 → 1.203.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -3
- package/dist/index.mjs +2 -2
- package/dist/skills/business-analysis/SKILL.md +722 -0
- package/dist/skills/business-analysis/as-is-capture.md +440 -0
- package/dist/skills/business-analysis/assets/progress.yaml +19 -0
- package/dist/skills/business-analysis/assets/task-list.md +34 -0
- package/dist/skills/business-analysis/automation-hub-publishing.md +47 -0
- package/dist/skills/business-analysis/bpmn-to-be-design.md +274 -0
- package/dist/skills/business-analysis/case-to-be-design.md +223 -0
- package/dist/skills/business-analysis/diagram-authoring.md +215 -0
- package/dist/skills/business-analysis/industry-gaps.md +134 -0
- package/dist/skills/business-analysis/interview-spine.md +297 -0
- package/dist/skills/business-analysis/locales/de.json +54 -0
- package/dist/skills/business-analysis/locales/en.json +54 -0
- package/dist/skills/business-analysis/locales/es-MX.json +54 -0
- package/dist/skills/business-analysis/locales/es.json +54 -0
- package/dist/skills/business-analysis/locales/fr.json +54 -0
- package/dist/skills/business-analysis/locales/ja.json +54 -0
- package/dist/skills/business-analysis/locales/ko.json +54 -0
- package/dist/skills/business-analysis/locales/pt-BR.json +54 -0
- package/dist/skills/business-analysis/locales/pt.json +54 -0
- package/dist/skills/business-analysis/locales/ro.json +54 -0
- package/dist/skills/business-analysis/locales/tr.json +54 -0
- package/dist/skills/business-analysis/locales/zh-CN.json +54 -0
- package/dist/skills/business-analysis/locales/zh-TW.json +54 -0
- package/dist/skills/business-analysis/pdd-generation.md +204 -0
- package/dist/skills/business-analysis/pdd-template.md +562 -0
- package/dist/skills/business-analysis/progress-presentation.json +13 -0
- package/dist/skills/business-analysis/recording-first.md +19 -0
- package/dist/skills/business-analysis/recording-processing.md +152 -0
- package/dist/skills/business-analysis/references/automation-hub-open-api.md +57 -0
- package/dist/skills/business-analysis/references/case-definition-spec.md +90 -0
- package/dist/skills/business-analysis/references/case-design-patterns/loan-origination-spec.md +86 -0
- package/dist/skills/business-analysis/references/component-type-mapping.md +52 -0
- package/dist/skills/business-analysis/references/uipath-products/case-management-schema.md +62 -0
- package/dist/skills/business-analysis/references/uipath-products/maestro-case-framework.md +65 -0
- package/dist/skills/business-analysis/references/uipath-products/maestro-case-management.md +49 -0
- package/dist/skills/business-analysis/research-offer.md +104 -0
- package/dist/skills/business-analysis/research-pass.md +149 -0
- package/dist/skills/business-analysis/scripts/assemble-pdd.ps1 +294 -0
- package/dist/skills/business-analysis/scripts/assemble-pdd.sh +453 -0
- package/dist/skills/business-analysis/scripts/check-phase-ready.ps1 +72 -0
- package/dist/skills/business-analysis/scripts/check-phase-ready.sh +98 -0
- package/dist/skills/business-analysis/scripts/lint-diagram.ps1 +524 -0
- package/dist/skills/business-analysis/scripts/lint-diagram.sh +519 -0
- package/dist/skills/business-analysis/scripts/stamp-pages.ps1 +363 -0
- package/dist/skills/business-analysis/scripts/stamp-pages.sh +360 -0
- package/dist/skills/business-analysis/to-be-design.md +199 -0
- package/dist/skills/confluence/SKILL.md +386 -0
- package/dist/skills/doc-coauthoring/SKILL.md +295 -0
- package/dist/skills/excel-architect/SKILL.macos.md +161 -0
- package/dist/skills/excel-architect/SKILL.md +180 -0
- package/dist/skills/excel-architect/SKILL.windows.md +61 -0
- package/dist/skills/excel-architect/archetypes/01-financial-model-advanced.md +332 -0
- package/dist/skills/excel-architect/archetypes/01-financial-model.md +248 -0
- package/dist/skills/excel-architect/archetypes/02-data-analysis.md +171 -0
- package/dist/skills/excel-architect/archetypes/03-tracking-dashboard.md +160 -0
- package/dist/skills/excel-architect/archetypes/04-project-planning.md +193 -0
- package/dist/skills/excel-architect/archetypes/05-simple-table.md +111 -0
- package/dist/skills/excel-architect/building.md +279 -0
- package/dist/skills/excel-architect/create.md +64 -0
- package/dist/skills/excel-architect/data-and-formulas.md +186 -0
- package/dist/skills/excel-architect/generator.md +272 -0
- package/dist/skills/excel-architect/macos/scripts/add-data-validation.applescript +242 -0
- package/dist/skills/excel-architect/macos/scripts/append-rows.applescript +310 -0
- package/dist/skills/excel-architect/macos/scripts/apply-conditional-format.applescript +565 -0
- package/dist/skills/excel-architect/macos/scripts/autofit-columns.applescript +79 -0
- package/dist/skills/excel-architect/macos/scripts/benchmark.sh +135 -0
- package/dist/skills/excel-architect/macos/scripts/check-compile.sh +30 -0
- package/dist/skills/excel-architect/macos/scripts/clear-range.applescript +152 -0
- package/dist/skills/excel-architect/macos/scripts/copy-paste.applescript +179 -0
- package/dist/skills/excel-architect/macos/scripts/create-chart.applescript +531 -0
- package/dist/skills/excel-architect/macos/scripts/create-pivot.applescript +443 -0
- package/dist/skills/excel-architect/macos/scripts/create-sheets.applescript +264 -0
- package/dist/skills/excel-architect/macos/scripts/create-workbook.applescript +92 -0
- package/dist/skills/excel-architect/macos/scripts/delete-chart.applescript +105 -0
- package/dist/skills/excel-architect/macos/scripts/delete-sheet.applescript +127 -0
- package/dist/skills/excel-architect/macos/scripts/filter-data.applescript +213 -0
- package/dist/skills/excel-architect/macos/scripts/find-replace.applescript +238 -0
- package/dist/skills/excel-architect/macos/scripts/format-range.applescript +531 -0
- package/dist/skills/excel-architect/macos/scripts/freeze-panes.applescript +133 -0
- package/dist/skills/excel-architect/macos/scripts/get-current-file.applescript +24 -0
- package/dist/skills/excel-architect/macos/scripts/get-sheet-dimensions.applescript +115 -0
- package/dist/skills/excel-architect/macos/scripts/health-check.applescript +704 -0
- package/dist/skills/excel-architect/macos/scripts/list-open-workbooks.applescript +80 -0
- package/dist/skills/excel-architect/macos/scripts/maximize-window.applescript +47 -0
- package/dist/skills/excel-architect/macos/scripts/merge-cells.applescript +227 -0
- package/dist/skills/excel-architect/macos/scripts/open-workbook.applescript +139 -0
- package/dist/skills/excel-architect/macos/scripts/read-range.applescript +267 -0
- package/dist/skills/excel-architect/macos/scripts/rename-sheet.applescript +231 -0
- package/dist/skills/excel-architect/macos/scripts/select-sheet.applescript +133 -0
- package/dist/skills/excel-architect/macos/scripts/set-tab-color.applescript +109 -0
- package/dist/skills/excel-architect/macos/scripts/sort-data.applescript +136 -0
- package/dist/skills/excel-architect/macos/scripts/undo.applescript +59 -0
- package/dist/skills/excel-architect/macos/scripts/workbook-lifecycle.applescript +149 -0
- package/dist/skills/excel-architect/macos/scripts/write-formula.applescript +225 -0
- package/dist/skills/excel-architect/macos/scripts/write-range.applescript +351 -0
- package/dist/skills/excel-architect/reference/api/advanced.md +381 -0
- package/dist/skills/excel-architect/reference/api/basic.md +747 -0
- package/dist/skills/excel-architect/reference/guides.md +348 -0
- package/dist/skills/excel-architect/reference/repair.md +174 -0
- package/dist/skills/excel-architect/reference/troubleshooting.md +46 -0
- package/dist/skills/excel-architect/scripting.md +266 -0
- package/dist/skills/excel-architect/styling-and-features.md +433 -0
- package/dist/skills/excel-architect/windows/api/composites.md +337 -0
- package/dist/skills/excel-architect/windows/api/scripting.md +139 -0
- package/dist/skills/excel-architect/windows/examples/level-1-workflows.md +485 -0
- package/dist/skills/excel-architect/windows/examples/level-2-advanced.md +690 -0
- package/dist/skills/excel-architect/windows/examples/level-3-scripting.md +337 -0
- package/dist/skills/github/SKILL.md +446 -0
- package/dist/skills/github/recipes/add-comment.md +85 -0
- package/dist/skills/github/recipes/check-pr-status.md +122 -0
- package/dist/skills/github/recipes/compare-branches.md +79 -0
- package/dist/skills/github/recipes/create-issue.md +103 -0
- package/dist/skills/github/recipes/create-pr.md +97 -0
- package/dist/skills/github/recipes/get-file-contents.md +76 -0
- package/dist/skills/github/recipes/get-last-commit.md +128 -0
- package/dist/skills/github/recipes/list-my-open-prs.md +105 -0
- package/dist/skills/github/recipes/list-recent-commits.md +84 -0
- package/dist/skills/github/recipes/search-issues.md +115 -0
- package/dist/skills/google-workspace/SKILL.md +217 -0
- package/dist/skills/google-workspace/services/calendar.md +311 -0
- package/dist/skills/google-workspace/services/docs.md +426 -0
- package/dist/skills/google-workspace/services/drive.md +504 -0
- package/dist/skills/google-workspace/services/gmail.md +466 -0
- package/dist/skills/google-workspace/services/sheets.md +370 -0
- package/dist/skills/internal-comms/SKILL.md +35 -0
- package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
- package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
- package/dist/skills/internal-comms/examples/general-comms.md +15 -0
- package/dist/skills/jira/SKILL.md +397 -0
- package/dist/skills/jira/recipes/add-comment.md +123 -0
- package/dist/skills/jira/recipes/assign-issue.md +157 -0
- package/dist/skills/jira/recipes/create-issue.md +274 -0
- package/dist/skills/jira/recipes/get-issue-details.md +154 -0
- package/dist/skills/jira/recipes/list-projects.md +151 -0
- package/dist/skills/jira/recipes/my-issues.md +180 -0
- package/dist/skills/jira/recipes/search-issues.md +215 -0
- package/dist/skills/jira/recipes/transition-issue.md +154 -0
- package/dist/skills/jira/recipes/troubleshooting.md +387 -0
- package/dist/skills/knowledge-base/SKILL.md +289 -0
- package/dist/skills/media-tools/SKILL.md +204 -0
- package/dist/skills/media-tools/references/encode-runbook.md +24 -0
- package/dist/skills/media-tools/references/resolve-binaries.md +81 -0
- package/dist/skills/media-tools/scripts/macos/ff-launch.sh +22 -0
- package/dist/skills/media-tools/scripts/macos/ff-poll.sh +10 -0
- package/dist/skills/media-tools/scripts/windows/ff-launch.ps1 +34 -0
- package/dist/skills/media-tools/scripts/windows/ff-poll.ps1 +20 -0
- package/dist/skills/office-download/SKILL.md +161 -0
- package/dist/skills/outlook-365/SKILL.macos.md +331 -0
- package/dist/skills/outlook-365/SKILL.md +171 -0
- package/dist/skills/outlook-365/SKILL.windows.md +124 -0
- package/dist/skills/outlook-365/api/bulk-email-operations.md +178 -0
- package/dist/skills/outlook-365/api/check-availability.md +87 -0
- package/dist/skills/outlook-365/api/create-inbox-rule.md +182 -0
- package/dist/skills/outlook-365/api/download-attachments.md +149 -0
- package/dist/skills/outlook-365/api/find-and-email-contact.md +185 -0
- package/dist/skills/outlook-365/api/manage-calendar-events.md +189 -0
- package/dist/skills/outlook-365/api/organize-with-folders.md +178 -0
- package/dist/skills/outlook-365/api/reply-to-conversation.md +68 -0
- package/dist/skills/outlook-365/api/schedule-meeting.md +73 -0
- package/dist/skills/outlook-365/api/search-and-read-email.md +93 -0
- package/dist/skills/outlook-365/api/send-email-with-attachments.md +94 -0
- package/dist/skills/outlook-365/api/send-email.md +396 -0
- package/dist/skills/outlook-365/api/set-out-of-office.md +196 -0
- package/dist/skills/outlook-365/macos/scripts/bulk-operations.applescript +429 -0
- package/dist/skills/outlook-365/macos/scripts/calendar.applescript +642 -0
- package/dist/skills/outlook-365/macos/scripts/contacts.applescript +635 -0
- package/dist/skills/outlook-365/macos/scripts/helpers.applescript +227 -0
- package/dist/skills/outlook-365/macos/scripts/read-emails.applescript +299 -0
- package/dist/skills/outlook-365/macos/scripts/search-emails.applescript +339 -0
- package/dist/skills/outlook-365/macos/scripts/send-email.applescript +245 -0
- package/dist/skills/outlook-365/uia/BASIC_OPERATIONS.md +278 -0
- package/dist/skills/outlook-365/uia/CALENDAR_OPERATIONS.md +386 -0
- package/dist/skills/outlook-365/uia/COMPOSE_EMAIL.md +426 -0
- package/dist/skills/outlook-365/uia/README.md +75 -0
- package/dist/skills/outlook-365/windows/com/bulk-operations.ps1 +241 -0
- package/dist/skills/outlook-365/windows/com/calendar.ps1 +227 -0
- package/dist/skills/outlook-365/windows/com/contacts.ps1 +270 -0
- package/dist/skills/outlook-365/windows/com/helpers.ps1 +158 -0
- package/dist/skills/outlook-365/windows/com/read-emails.ps1 +115 -0
- package/dist/skills/outlook-365/windows/com/search-emails.ps1 +141 -0
- package/dist/skills/outlook-365/windows/com/send-email.ps1 +121 -0
- package/dist/skills/pdf-architect/SKILL.md +640 -0
- package/dist/skills/powerpoint-architect/SKILL.macos.md +271 -0
- package/dist/skills/powerpoint-architect/SKILL.md +853 -0
- package/dist/skills/powerpoint-architect/SKILL.windows.md +458 -0
- package/dist/skills/powerpoint-architect/custom_themes.md +141 -0
- package/dist/skills/powerpoint-architect/editing-guide.md +424 -0
- package/dist/skills/powerpoint-architect/generator-reference.md +668 -0
- package/dist/skills/powerpoint-architect/images-guide.md +207 -0
- package/dist/skills/powerpoint-architect/issue-fix-mapping.md +768 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-html-to-slide.applescript +389 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-slide.applescript +255 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-speaker-notes.applescript +132 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-text.applescript +245 -0
- package/dist/skills/powerpoint-architect/macos/scripts/apply-slide-layout.applescript +80 -0
- package/dist/skills/powerpoint-architect/macos/scripts/apply-theme.applescript +122 -0
- package/dist/skills/powerpoint-architect/macos/scripts/autofit-placeholders.applescript +62 -0
- package/dist/skills/powerpoint-architect/macos/scripts/close-presentation.applescript +24 -0
- package/dist/skills/powerpoint-architect/macos/scripts/copy-slides.applescript +303 -0
- package/dist/skills/powerpoint-architect/macos/scripts/create-chart-with-data.applescript +305 -0
- package/dist/skills/powerpoint-architect/macos/scripts/create-with-theme.applescript +56 -0
- package/dist/skills/powerpoint-architect/macos/scripts/delete-slides.applescript +137 -0
- package/dist/skills/powerpoint-architect/macos/scripts/export-presentation.applescript +100 -0
- package/dist/skills/powerpoint-architect/macos/scripts/extract-slide-data.applescript +138 -0
- package/dist/skills/powerpoint-architect/macos/scripts/format-shape.applescript +192 -0
- package/dist/skills/powerpoint-architect/macos/scripts/format-slide-content.applescript +336 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-current-slide-number.applescript +38 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-file-path.applescript +94 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-layout-elements.applescript +141 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-layouts.applescript +58 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-opened-files.applescript +50 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-presentation-info.applescript +150 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-recent-files.applescript +68 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-slide-count.applescript +37 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-slide-info.applescript +105 -0
- package/dist/skills/powerpoint-architect/macos/scripts/health-check.applescript +690 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-shape.applescript +188 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-table.applescript +112 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-text-box.applescript +225 -0
- package/dist/skills/powerpoint-architect/macos/scripts/manage-image.applescript +486 -0
- package/dist/skills/powerpoint-architect/macos/scripts/maximize-window.applescript +48 -0
- package/dist/skills/powerpoint-architect/macos/scripts/navigate-to-slide.applescript +84 -0
- package/dist/skills/powerpoint-architect/macos/scripts/open-presentation.applescript +38 -0
- package/dist/skills/powerpoint-architect/macos/scripts/reorder-slides.applescript +106 -0
- package/dist/skills/powerpoint-architect/macos/scripts/replace-text.applescript +193 -0
- package/dist/skills/powerpoint-architect/macos/scripts/save-presentation.applescript +54 -0
- package/dist/skills/powerpoint-architect/macos/scripts/set-animation.applescript +203 -0
- package/dist/skills/powerpoint-architect/macos/scripts/set-transition.applescript +130 -0
- package/dist/skills/powerpoint-architect/visual-styling-guide.md +206 -0
- package/dist/skills/powerpoint-architect/windows/api/advanced.md +317 -0
- package/dist/skills/powerpoint-architect/windows/api/basic.md +392 -0
- package/dist/skills/powerpoint-architect/windows/examples/10-slide-presentation.md +140 -0
- package/dist/skills/powerpoint-architect/windows/examples/custom-theme-workflow.md +219 -0
- package/dist/skills/powerpoint-architect/windows/examples/level-1-workflows.md +531 -0
- package/dist/skills/powerpoint-architect/windows/examples/level-2-scripting.md +239 -0
- package/dist/skills/powerpoint-architect/windows/scripts/create-with-theme.ps1 +81 -0
- package/dist/skills/project-task-list/SKILL.md +174 -0
- package/dist/skills/slack-operation/SKILL.md +97 -0
- package/dist/skills/slack-operation/api/advanced-api/GUIDE.md +277 -0
- package/dist/skills/slack-operation/api/search-and-read/EXAMPLE.md +75 -0
- package/dist/skills/slack-operation/api/search-and-read/GUIDE.md +108 -0
- package/dist/skills/slack-operation/api/send-message/EXAMPLE.md +112 -0
- package/dist/skills/slack-operation/api/send-message/GUIDE.md +63 -0
- package/dist/skills/slack-operation/api/share-files/EXAMPLE.md +94 -0
- package/dist/skills/slack-operation/api/share-files/GUIDE.md +63 -0
- package/dist/skills/slack-operation/ui/desktop-automation/GUIDE.md +55 -0
- package/dist/skills/system-diagnostics/SKILL.md +263 -0
- package/dist/skills/teams-operation/SKILL.md +79 -0
- package/dist/skills/teams-operation/api/advanced-api/GUIDE.md +234 -0
- package/dist/skills/teams-operation/api/meetings/EXAMPLE.md +63 -0
- package/dist/skills/teams-operation/api/meetings/GUIDE.md +52 -0
- package/dist/skills/teams-operation/api/search-and-read/EXAMPLE.md +72 -0
- package/dist/skills/teams-operation/api/search-and-read/GUIDE.md +54 -0
- package/dist/skills/teams-operation/api/send-message/EXAMPLE.md +92 -0
- package/dist/skills/teams-operation/api/send-message/GUIDE.md +60 -0
- package/dist/skills/teams-operation/ui/desktop-automation/GUIDE.md +66 -0
- package/dist/skills/transcribe-media/SKILL.md +142 -0
- package/dist/skills/uipath-integrations/SKILL.md +370 -0
- package/dist/skills/uipath-integrations/reference/connectors.md +331 -0
- package/dist/skills/uipath-integrations/reference/endpoints.md +220 -0
- package/dist/skills/uipath-integrations/reference/errors.md +211 -0
- package/dist/skills/uipath-integrations/reference/metadata.md +317 -0
- package/dist/skills/uipath-integrations/reference/operations.md +297 -0
- package/dist/skills/uipath-orchestrator/SKILL.md +312 -0
- package/dist/skills/uipath-orchestrator/recipes/assets.md +282 -0
- package/dist/skills/uipath-orchestrator/recipes/audit-logs.md +215 -0
- package/dist/skills/uipath-orchestrator/recipes/buckets.md +205 -0
- package/dist/skills/uipath-orchestrator/recipes/jobs.md +286 -0
- package/dist/skills/uipath-orchestrator/recipes/list-folders.md +207 -0
- package/dist/skills/uipath-orchestrator/recipes/queue-items.md +292 -0
- package/dist/skills/uipath-orchestrator/recipes/queues.md +232 -0
- package/dist/skills/uipath-orchestrator/recipes/releases.md +212 -0
- package/dist/skills/uipath-orchestrator/recipes/robots-sessions.md +274 -0
- package/dist/skills/uipath-orchestrator/recipes/schedules.md +280 -0
- package/dist/skills/uipath-orchestrator/reference/endpoints.md +85 -0
- package/dist/skills/uipath-orchestrator/reference/schemas.md +153 -0
- package/dist/skills/uipath-taskautomation/SKILL.md +310 -0
- package/dist/skills/uipath-taskautomation/assets/CodedWorkflow.template.cs +98 -0
- package/dist/skills/uipath-taskautomation/assets/ExampleWorkflow.cs +146 -0
- package/dist/skills/uipath-taskautomation/references/action-activity-map.json +32 -0
- package/dist/skills/uipath-taskautomation/references/action-activity-map.md +44 -0
- package/dist/skills/uipath-taskautomation/references/app-profiles.md +63 -0
- package/dist/skills/uipath-taskautomation/references/automation-spec.md +88 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/before-after-hooks-template.md +115 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/codedworkflow-template.md +186 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/helper-utility-template.md +22 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/json-template.md +91 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/testcase-template.md +92 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/cli-reference.md +249 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/codedworkflow-reference.md +275 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/coding-guidelines.md +229 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/inspect-package-guide.md +81 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/integration-service-guide.md +507 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/operations-guide.md +410 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/third-party-packages-guide.md +67 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/data-manipulation-guide.md +110 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/environment-setup.md +194 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/error-handling-guide.md +195 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/powershell-interop-guide.md +57 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure-guide.md +114 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure.md +126 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/uia-elements-interaction-guide.md +109 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/validation-guide.md +147 -0
- package/dist/skills/uipath-taskautomation/references/coded-workflow-authoring.md +219 -0
- package/dist/skills/uipath-taskautomation/references/profiling-output.md +80 -0
- package/dist/skills/uipath-taskautomation/references/reliability-guide.md +83 -0
- package/dist/skills/uipath-taskautomation/references/task-automation-cheatsheet.md +272 -0
- package/dist/skills/uipath-taskautomation/references/template-preflight.md +17 -0
- package/dist/skills/uipath-workflow-documenter/SKILL.md +430 -0
- package/dist/skills/uipath-workflow-documenter/layouts/pdd-template.md +265 -0
- package/dist/skills/uipath-workflow-documenter/routines/from-orchestrator.md +11 -0
- package/dist/skills/uipath-workflow-documenter/routines/from-workflow.md +11 -0
- package/dist/skills/word-architect/SKILL.macos.md +147 -0
- package/dist/skills/word-architect/SKILL.md +502 -0
- package/dist/skills/word-architect/SKILL.windows.md +55 -0
- package/dist/skills/word-architect/api/advanced.md +522 -0
- package/dist/skills/word-architect/api/basic.md +378 -0
- package/dist/skills/word-architect/api/expert.md +302 -0
- package/dist/skills/word-architect/generation.md +308 -0
- package/dist/skills/word-architect/layouts/01-professional.md +168 -0
- package/dist/skills/word-architect/layouts/02-educational-kids.md +354 -0
- package/dist/skills/word-architect/layouts/03-academic.md +83 -0
- package/dist/skills/word-architect/layouts/04-creative.md +242 -0
- package/dist/skills/word-architect/layouts/05-operational.md +94 -0
- package/dist/skills/word-architect/macos/scripts/apply-heading-style.applescript +215 -0
- package/dist/skills/word-architect/macos/scripts/apply-style.applescript +272 -0
- package/dist/skills/word-architect/macos/scripts/autofit-tables.applescript +53 -0
- package/dist/skills/word-architect/macos/scripts/close-document.applescript +287 -0
- package/dist/skills/word-architect/macos/scripts/create-chart-with-data.applescript +379 -0
- package/dist/skills/word-architect/macos/scripts/create-chart.applescript +191 -0
- package/dist/skills/word-architect/macos/scripts/delete-selection.applescript +223 -0
- package/dist/skills/word-architect/macos/scripts/export-document.applescript +167 -0
- package/dist/skills/word-architect/macos/scripts/extract-table.applescript +168 -0
- package/dist/skills/word-architect/macos/scripts/find-by-style.applescript +173 -0
- package/dist/skills/word-architect/macos/scripts/find-text.applescript +199 -0
- package/dist/skills/word-architect/macos/scripts/format-table.applescript +234 -0
- package/dist/skills/word-architect/macos/scripts/format-text.applescript +431 -0
- package/dist/skills/word-architect/macos/scripts/get-document-properties.applescript +95 -0
- package/dist/skills/word-architect/macos/scripts/get-document-structure.applescript +371 -0
- package/dist/skills/word-architect/macos/scripts/get-header-footer-text.applescript +106 -0
- package/dist/skills/word-architect/macos/scripts/get-images.applescript +166 -0
- package/dist/skills/word-architect/macos/scripts/get-opened-files.applescript +103 -0
- package/dist/skills/word-architect/macos/scripts/get-paragraph-bounds.applescript +133 -0
- package/dist/skills/word-architect/macos/scripts/get-paragraph-format.applescript +134 -0
- package/dist/skills/word-architect/macos/scripts/get-recent-files.applescript +82 -0
- package/dist/skills/word-architect/macos/scripts/get-styled-text.applescript +256 -0
- package/dist/skills/word-architect/macos/scripts/get-tables.applescript +126 -0
- package/dist/skills/word-architect/macos/scripts/get-text-formatting.applescript +224 -0
- package/dist/skills/word-architect/macos/scripts/get-text.applescript +383 -0
- package/dist/skills/word-architect/macos/scripts/get-theme-colors.applescript +123 -0
- package/dist/skills/word-architect/macos/scripts/health-check.applescript +606 -0
- package/dist/skills/word-architect/macos/scripts/insert-cover-page.applescript +77 -0
- package/dist/skills/word-architect/macos/scripts/insert-header-footer.applescript +87 -0
- package/dist/skills/word-architect/macos/scripts/insert-horizontal-line.applescript +112 -0
- package/dist/skills/word-architect/macos/scripts/insert-html.applescript +440 -0
- package/dist/skills/word-architect/macos/scripts/insert-hyperlink.applescript +191 -0
- package/dist/skills/word-architect/macos/scripts/insert-image.applescript +320 -0
- package/dist/skills/word-architect/macos/scripts/insert-list.applescript +317 -0
- package/dist/skills/word-architect/macos/scripts/insert-pagebreak.applescript +181 -0
- package/dist/skills/word-architect/macos/scripts/insert-smartart.applescript +104 -0
- package/dist/skills/word-architect/macos/scripts/insert-table.applescript +238 -0
- package/dist/skills/word-architect/macos/scripts/insert-text.applescript +677 -0
- package/dist/skills/word-architect/macos/scripts/insert-textbox.applescript +261 -0
- package/dist/skills/word-architect/macos/scripts/maximize-window.applescript +67 -0
- package/dist/skills/word-architect/macos/scripts/normalize-formatting.applescript +56 -0
- package/dist/skills/word-architect/macos/scripts/open-document.applescript +222 -0
- package/dist/skills/word-architect/macos/scripts/replace-text.applescript +390 -0
- package/dist/skills/word-architect/macos/scripts/save-document.applescript +230 -0
- package/dist/skills/word-architect/macos/scripts/select-range.applescript +142 -0
- package/dist/skills/word-architect/macos/scripts/set-document-properties.applescript +195 -0
- package/dist/skills/word-architect/macos/scripts/set-page-layout.applescript +273 -0
- package/dist/skills/word-architect/macos/scripts/set-theme-colors.applescript +264 -0
- package/dist/skills/word-architect/macos/scripts/undo-redo.applescript +61 -0
- package/dist/skills/word-architect/macos/scripts/update-toc.applescript +112 -0
- package/dist/skills/word-architect/reference/formatting.md +119 -0
- package/dist/skills/word-architect/reference/html-layouts/01-executive-summary-box.md +36 -0
- package/dist/skills/word-architect/reference/html-layouts/02-kpi-summary-table.md +68 -0
- package/dist/skills/word-architect/reference/html-layouts/03-comparison-table.md +63 -0
- package/dist/skills/word-architect/reference/html-layouts/04-pros-cons-table.md +86 -0
- package/dist/skills/word-architect/reference/html-layouts/05-timeline-table.md +114 -0
- package/dist/skills/word-architect/reference/html-layouts/06-raci-matrix.md +95 -0
- package/dist/skills/word-architect/reference/html-layouts/07-data-table-alternating.md +84 -0
- package/dist/skills/word-architect/reference/html-layouts/08-callout-box.md +102 -0
- package/dist/skills/word-architect/reference/html-layouts/09-vertical-milestone.md +100 -0
- package/dist/skills/word-architect/reference/quality-assurance.md +102 -0
- package/dist/skills/word-architect/reference/tables.md +62 -0
- package/dist/skills/word-architect/reference/tracked-changes.md +34 -0
- package/dist/skills/word-architect/reference/uia-fallback.md +231 -0
- package/dist/skills/word-architect/reference/visual-elements.md +82 -0
- package/dist/skills/word-architect/windows/scripts/apply-heading-style.ps1 +190 -0
- package/dist/skills/word-architect/windows/scripts/autofit-tables.ps1 +64 -0
- package/dist/skills/word-architect/windows/scripts/create-chart-with-data.ps1 +133 -0
- package/dist/skills/word-architect/windows/scripts/create-chart.ps1 +73 -0
- package/dist/skills/word-architect/windows/scripts/export-document.ps1 +86 -0
- package/dist/skills/word-architect/windows/scripts/get-current-file.ps1 +27 -0
- package/dist/skills/word-architect/windows/scripts/insert-cover-page.ps1 +79 -0
- package/dist/skills/word-architect/windows/scripts/insert-horizontal-line.ps1 +74 -0
- package/dist/skills/word-architect/windows/scripts/insert-image.ps1 +98 -0
- package/dist/skills/word-architect/windows/scripts/insert-smartart.ps1 +118 -0
- package/dist/skills/word-architect/windows/scripts/insert-text-box.ps1 +90 -0
- package/dist/skills/word-architect/windows/scripts/normalize-formatting.ps1 +63 -0
- package/package.json +5 -4
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# Word API — Basic (MANDATORY)
|
|
2
|
+
|
|
3
|
+
**Load this file before ANY edit operation.** Covers the core endpoints needed for 90% of tasks.
|
|
4
|
+
|
|
5
|
+
All positions are **0-based**. All paragraph numbers are **1-based**.
|
|
6
|
+
|
|
7
|
+
Native Word is active-document stateful. Never run native Word calls in parallel. For multiple documents, finish one document's open → read → edit → save sequence before touching the next.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ⚠️ Stale Positions — The #1 Cause of Insert/Replace Failures
|
|
12
|
+
|
|
13
|
+
**Every successful `/word/insert/*`, `/word/replace/*`, `/word/selection/delete`, or `/word/apply/style` shifts character indices, paragraph numbers, and `contextBefore`/`contextAfter` text for the rest of the document.** All values you read BEFORE that call are now stale.
|
|
14
|
+
|
|
15
|
+
**Rule:** RIGHT BEFORE every position-bearing call, refresh:
|
|
16
|
+
- `/word/get/text` (or `/word/get/paragraph-bounds`) to get the actual `contextBefore`/`contextAfter`/`expectedText` at the position you want
|
|
17
|
+
- `/word/find/text` to get a fresh paragraph number after structural edits
|
|
18
|
+
- `/word/get/document-structure` to see the new outline
|
|
19
|
+
|
|
20
|
+
**Never** reuse `characterIndex`, `position`, `contextBefore`, `contextAfter`, or `paragraphNumber` from a read that happened before any edit. Even one insert invalidates them.
|
|
21
|
+
|
|
22
|
+
**Prefer** `paragraphStart`/`paragraphEnd` anchors with a fresh paragraph number over `characterIndex` — paragraph anchors survive most edits; char indices do not.
|
|
23
|
+
|
|
24
|
+
If you see `Position validation failed` or `SelectionEnd is beyond document end`, the cause is almost always stale state. Re-read first, retry second.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Position & Range Reference
|
|
29
|
+
|
|
30
|
+
### Position Object
|
|
31
|
+
|
|
32
|
+
Used by insert operations. Specifies WHERE to insert.
|
|
33
|
+
|
|
34
|
+
| Field | Required | Description |
|
|
35
|
+
|-------|----------|-------------|
|
|
36
|
+
| `anchor` | Yes | `documentStart`, `documentEnd`, `paragraphStart`, `paragraphEnd`, or `characterIndex` |
|
|
37
|
+
| `paragraph` | If paragraph anchor | 1-based paragraph number |
|
|
38
|
+
| `index` | If characterIndex | 0-based character index |
|
|
39
|
+
| `contextBefore` | Windows | ~20 chars before position (validation). Omit on macOS. |
|
|
40
|
+
| `contextAfter` | Windows | ~20 chars after position. Empty `""` for `documentEnd`. MUST start with `␍` for `paragraphEnd`. Omit on macOS. |
|
|
41
|
+
|
|
42
|
+
`contextBefore`/`contextAfter` are validated on Windows, but `autocorrectContextErrors` defaults to `true` there, so common slips (a missing `␍`, a non-empty `contextAfter` at `documentEnd`) are silently repaired rather than rejected — only a genuine content mismatch errors. macOS does not check them at all. Treat them as documentation of intent on both platforms, not a safety net.
|
|
43
|
+
|
|
44
|
+
### Range Object
|
|
45
|
+
|
|
46
|
+
Used by replace, format, style, delete operations. Specifies WHAT range to act on.
|
|
47
|
+
|
|
48
|
+
| Field | Required | Description |
|
|
49
|
+
|-------|----------|-------------|
|
|
50
|
+
| `start` | Yes | `{ "anchor": "paragraphStart", "paragraph": N }` or `{ "anchor": "characterIndex", "index": N }` |
|
|
51
|
+
| `end` | Yes | Same format as start |
|
|
52
|
+
| `expectedText` | Yes | Actual text in range. Get from `/word/get/text` — NEVER guess. |
|
|
53
|
+
| `expectedTextCompact` | No | macOS only. `true` → read `expectedText` as `first20~~~last20`, checking prefix and suffix only. Use for large ranges. |
|
|
54
|
+
|
|
55
|
+
⚠️ **Compact matching is opt-in on macOS, implicit on Windows.** macOS compares `expectedText` literally unless you also send `expectedTextCompact: true`, so text that itself contains `~~~` verifies correctly by default. Windows still reads any `~~~` as the separator, so on Windows a range whose text contains `~~~` leaves everything between the first `~~~` and the end unchecked — send a range whose text has no `~~~`, or verify it on macOS.
|
|
56
|
+
|
|
57
|
+
macOS resolves `paragraphStart`/`paragraphEnd`/`characterIndex`/`documentStart`/`documentEnd` anchors to real character positions before acting, and — when `expectedText` is present — verifies the resolved span holds that text. A mismatch fails with a stale-position error instead of acting on the wrong range.
|
|
58
|
+
|
|
59
|
+
### Insert Text Boundaries
|
|
60
|
+
|
|
61
|
+
For `/word/insert/text`, send content only in `text`. Do not add a leading or trailing `␍`. `insertMode: "NewParagraph"` adds the one required paragraph boundary based on the anchor.
|
|
62
|
+
|
|
63
|
+
Windows calls that explicitly set `autocorrectContextErrors: false` are the exception; follow their validation error if a manual boundary is required.
|
|
64
|
+
|
|
65
|
+
`␍` remains part of actual document context and `expectedText`. Copy it from a fresh read; never guess it.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Open Document
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
endpoint: "/word/open-attach"
|
|
73
|
+
body: {
|
|
74
|
+
"filePath": "C:\\Documents\\report.docx",
|
|
75
|
+
"createNew": false
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| Parameter | Required | Description |
|
|
80
|
+
|-----------|----------|-------------|
|
|
81
|
+
| `filePath` | Yes | Absolute path (must include drive letter) |
|
|
82
|
+
| `createNew` | Yes | `true` = create new (fails if exists), `false` = open existing |
|
|
83
|
+
| `visible` | No | **Windows only.** Defaults to `false`: Word does not appear on screen. Pass `true` ONLY when the user asked to see the document — see "Windowless by Default (Windows)" in SKILL.md |
|
|
84
|
+
|
|
85
|
+
**On macOS `visible` does nothing.** The macOS executor ignores it, activates Word and maximizes the window, so the document appears whatever you pass. Never plan or claim off-screen work on macOS.
|
|
86
|
+
|
|
87
|
+
Returns: `documentId`, `pid`, `pageCount`, `characterCount`, `wordCount`, `paragraphCount`, `documentState`.
|
|
88
|
+
|
|
89
|
+
`documentId` and `pid` are real numbers even for a windowless document — they come from its own hidden window — and are `0` only when Word cannot report a window at all. Do not depend on either: every other endpoint targets the document by `filePath`.
|
|
90
|
+
|
|
91
|
+
A document the user already has open keeps its window whatever `visible` says: attaching never hides what they are looking at.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Save Document
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
endpoint: "/word/save"
|
|
99
|
+
body: { "filePath": "...", "saveAsPath": "..." }
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`saveAsPath` is optional (Save As).
|
|
103
|
+
|
|
104
|
+
**⚠️ Word edits are NOT auto-saved — call `/word/save` when you are done.** Every `/word/*`
|
|
105
|
+
mutation (replace, insert, format, apply style, delete) changes only the open document; on
|
|
106
|
+
both Windows and macOS nothing reaches disk until an explicit `/word/save`. Report a task as
|
|
107
|
+
complete only after that call succeeds. (This differs from `/ppt/*`, which saves after each
|
|
108
|
+
mutation on both platforms — do not carry the PowerPoint habit over to Word.)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Close Document
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
endpoint: "/word/close"
|
|
116
|
+
body: { "filePath": "..." }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Save before closing to preserve changes.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Get Document Structure
|
|
124
|
+
|
|
125
|
+
**ALWAYS call first** to understand the document before editing.
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
endpoint: "/word/get/document-structure"
|
|
129
|
+
body: { "filePath": "...", "includeContent": false, "includeParagraphBounds": false }
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Returns: hierarchical headings with `level`, `text`, `paragraphNumber`, `startPosition`, `endPosition`. With `includeContent: true`: content between headings (max 500 chars each).
|
|
133
|
+
|
|
134
|
+
`includeParagraphBounds: true` (macOS) adds `paragraphBounds: [{paragraphNumber, paragraphStart, paragraphEnd}, ...]` covering EVERY paragraph. Use it whenever you need offsets for more than two paragraphs — one call replaces one `/word/get/paragraph-bounds` per paragraph, and the offsets feed `/word/apply/style` and `/word/format/text` batches directly. Offsets are always Word's own; the endpoint falls back to a per-paragraph read when it cannot derive them safely, so it stays correct on documents containing tables or astral characters.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Get Text
|
|
139
|
+
|
|
140
|
+
Call before any edit to see actual content.
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
endpoint: "/word/get/text"
|
|
144
|
+
body: { "filePath": "...", "paragraphNumber": 3 }
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
| Parameter | Description |
|
|
148
|
+
|-----------|-------------|
|
|
149
|
+
| `paragraphNumber` | 1-based. Cannot use with selectionStart/End |
|
|
150
|
+
| `selectionStart` + `selectionEnd` | 0-based character positions, half-open: `selectionEnd` is excluded. Equal values read nothing. Cannot use with paragraphNumber |
|
|
151
|
+
| `maxChars` | Cap on returned chars. Default 8,000, clamped to [100, 50,000]. macOS truncates above the cap and sets `truncated: true`; Windows returns an error pointing at the cap. |
|
|
152
|
+
|
|
153
|
+
**Default cap:** 8,000 chars. Raise via `maxChars` up to 50,000 when you really need the whole document; prefer `paragraphNumber` or `selectionStart`/`selectionEnd` for targeted reads.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Get Paragraph Bounds
|
|
158
|
+
|
|
159
|
+
Get exact character positions for a paragraph.
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
endpoint: "/word/get/paragraph-bounds"
|
|
163
|
+
body: { "filePath": "...", "paragraphNumber": 3 }
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Returns `paragraphStart` and `paragraphEnd`. macOS also returns `text`, `contextBefore`, and `contextAfter`; its context fields surround the `paragraphEnd` insertion point, so `contextBefore` is the paragraph tail and `contextAfter` starts with its paragraph mark.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Find Text
|
|
171
|
+
|
|
172
|
+
Search for text and get positions.
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
endpoint: "/word/find/text"
|
|
176
|
+
body: {
|
|
177
|
+
"filePath": "...",
|
|
178
|
+
"searchText": "revenue",
|
|
179
|
+
"caseSensitive": false,
|
|
180
|
+
"matchWholeWord": false,
|
|
181
|
+
"contextCharacters": 300
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Returns: array of matches with `position`, `length`, `context`, `paragraphNumber`. Use `position` for `characterIndex` anchor in subsequent operations.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Replace Text
|
|
190
|
+
|
|
191
|
+
Replaces the FIRST occurrence within a range. **Always use `find/text` first.**
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
endpoint: "/word/replace/text"
|
|
195
|
+
body: {
|
|
196
|
+
"filePath": "...",
|
|
197
|
+
"oldText": "2023",
|
|
198
|
+
"newText": "2024",
|
|
199
|
+
"range": {
|
|
200
|
+
"start": { "anchor": "characterIndex", "index": 150 },
|
|
201
|
+
"end": { "anchor": "characterIndex", "index": 154 },
|
|
202
|
+
"expectedText": "2023"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
| Parameter | Required | Description |
|
|
208
|
+
|-----------|----------|-------------|
|
|
209
|
+
| `oldText` | Yes | Text to find and replace |
|
|
210
|
+
| `newText` | Yes | Replacement text |
|
|
211
|
+
| `range` | Yes | Range to search within (see Range Object) |
|
|
212
|
+
|
|
213
|
+
**When replacing multiple occurrences, process from end to start** (highest position first) to avoid position shifts.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Insert Text
|
|
218
|
+
|
|
219
|
+
**macOS only: normal DOCX supports batch mode.** Windows has no batch endpoint — send sequential single calls. A `batch` array is ignored there and the call fails validation (`insertMode is required...`, or `Position is required.` if you did supply `insertMode`). Each batch item contains `text`, `insertMode`, and `position`; do not use replace's `range` schema. A batch uses either document coordinates or paragraph coordinates, never both. See [advanced.md](advanced.md#batch-operations) for the exact supported groups.
|
|
220
|
+
|
|
221
|
+
**Compatibility Mode rejects batch.** It supports only `documentStart` and `documentEnd` inserts, sent as separate sequential calls.
|
|
222
|
+
|
|
223
|
+
macOS `documentEnd` payload:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
endpoint: "/word/insert/text"
|
|
227
|
+
body: {
|
|
228
|
+
"filePath": "...",
|
|
229
|
+
"text": "New paragraph content",
|
|
230
|
+
"insertMode": "NewParagraph",
|
|
231
|
+
"position": { "anchor": "documentEnd" }
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
| Parameter | Required | Description |
|
|
236
|
+
|-----------|----------|-------------|
|
|
237
|
+
| `text` | Yes | Content only. Do not add a leading or trailing `␍`. |
|
|
238
|
+
| `insertMode` | **Yes** | `NewParagraph` = creates one paragraph boundary. `WithinParagraph` = inserts inline. |
|
|
239
|
+
| `position` | Yes | Position Object |
|
|
240
|
+
|
|
241
|
+
On Windows `documentEnd`, get the final paragraph number from a fresh structure read, call `/word/get/paragraph-bounds`, then `/word/get/text` for that returned range. Copy the actual text tail into `contextBefore` and set `contextAfter` to `""`. Never reuse or invent context.
|
|
242
|
+
|
|
243
|
+
**Style inheritance:** New paragraphs inherit the style of the preceding paragraph. If you insert after a Heading 1, the new paragraph will also be Heading 1. Always follow with `/word/apply/style` to set `Normal` (or the desired style).
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Insert HTML
|
|
248
|
+
|
|
249
|
+
Insert formatted content (tables, lists, styled text) via clipboard.
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
endpoint: "/word/insert/html"
|
|
253
|
+
body: {
|
|
254
|
+
"filePath": "...",
|
|
255
|
+
"html": "<h2>Section</h2><p>Content with <b>bold</b></p>",
|
|
256
|
+
"position": { "anchor": "documentEnd", "contextBefore": "...", "contextAfter": "" },
|
|
257
|
+
"fontFamily": "Calibri"
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
| Parameter | Required | Description |
|
|
262
|
+
|-----------|----------|-------------|
|
|
263
|
+
| `html` | Yes | HTML content |
|
|
264
|
+
| `position` | Yes | Position Object |
|
|
265
|
+
| `fontFamily` | No | Font to apply (match document) |
|
|
266
|
+
|
|
267
|
+
Supported: `<table>`, `<tr>`, `<td>`, `<th>`, `<ul>`, `<ol>`, `<li>`, `<b>`, `<i>`, `<u>`, `<h1>`-`<h6>`, `<a>`, `<p>`, `<br>`, inline styles. For emoji encoding, see expert.md.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Insert Page Break
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
endpoint: "/word/insert/pagebreak"
|
|
275
|
+
body: { "filePath": "...", "position": { ... } }
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Use before major sections (H1), TOC, appendices.
|
|
279
|
+
|
|
280
|
+
**⚠️ After a pagebreak insert, `documentEnd` `contextBefore` goes stale.** The next position-bearing call that uses `{ "anchor": "documentEnd" }` will fail "Position validation failed" because the cached `contextBefore` no longer matches the document tail. Switch to `{ "anchor": "paragraphEnd", "paragraph": <N> }` of a known paragraph from a fresh `/word/get/document-structure` instead, or re-read the end-of-document context first.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Delete Selection
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
endpoint: "/word/selection/delete"
|
|
288
|
+
body: {
|
|
289
|
+
"filePath": "...",
|
|
290
|
+
"range": {
|
|
291
|
+
"start": { "anchor": "paragraphStart", "paragraph": 3 },
|
|
292
|
+
"end": { "anchor": "paragraphStart", "paragraph": 4 },
|
|
293
|
+
"expectedText": "Paragraph 3 content␍"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Delete patterns:**
|
|
299
|
+
|
|
300
|
+
| Goal | Start | End | expectedText includes |
|
|
301
|
+
|------|-------|-----|-----------------------|
|
|
302
|
+
| Delete middle para N | `paragraphStart N` | `paragraphStart N+1` | Content + trailing `␍` |
|
|
303
|
+
| Delete last para | `paragraphEnd N-1` | `documentEnd` | Leading `␍` + content |
|
|
304
|
+
| Delete specific text | `characterIndex` from find | `characterIndex` from find | Exact text |
|
|
305
|
+
|
|
306
|
+
**Plain-int alias (macOS only):** `/word/selection` and `/word/selection/delete` also accept top-level `start`/`end` ints instead of a `range` object: `{ "filePath": "...", "start": 10, "end": 20 }`. On Windows these endpoints bind only the `range` object — top-level ints are ignored and the call fails. Always send `range` with anchors: it works on both platforms and survives edits that shift character positions.
|
|
307
|
+
|
|
308
|
+
**`/word/selection/delete` requires a range or start/end.** Omitting both is rejected — it does not fall back to deleting the whole document.
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Format Text
|
|
313
|
+
|
|
314
|
+
**Requires a `range` object** — you cannot pass a bare `paragraphNumber`. Always use a full Range with `start`, `end`, and `expectedText`.
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
endpoint: "/word/format/text"
|
|
318
|
+
body: {
|
|
319
|
+
"filePath": "...",
|
|
320
|
+
"range": {
|
|
321
|
+
"start": { "anchor": "paragraphStart", "paragraph": 1 },
|
|
322
|
+
"end": { "anchor": "paragraphEnd", "paragraph": 1 },
|
|
323
|
+
"expectedText": "Introduction"
|
|
324
|
+
},
|
|
325
|
+
"bold": true,
|
|
326
|
+
"fontSize": 14,
|
|
327
|
+
"textColorHex": "0000FF"
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Formatting options:** `fontName`, `fontSize`, `bold`, `italic`, `underline`, `strikethrough`, `textColorHex` (no #), `highlightColor` (Yellow, Green, Cyan, etc.), `alignment` (Left, Center, Right, Justify), `paragraphBackgroundColorHex`.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Apply Style
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
endpoint: "/word/apply/style"
|
|
339
|
+
body: {
|
|
340
|
+
"filePath": "...",
|
|
341
|
+
"styleName": "Heading 1",
|
|
342
|
+
"range": {
|
|
343
|
+
"start": { "anchor": "paragraphStart", "paragraph": 1 },
|
|
344
|
+
"end": { "anchor": "paragraphEnd", "paragraph": 1 },
|
|
345
|
+
"expectedText": "Introduction"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
| Parameter | Required | Description |
|
|
351
|
+
|-----------|----------|-------------|
|
|
352
|
+
| `styleName` | Yes | `Heading 1`, `Heading 2`, `Title`, `Normal`, etc. |
|
|
353
|
+
| `range` | Yes | Range Object |
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Best Practices
|
|
358
|
+
|
|
359
|
+
1. **Always `get/document-structure` first** — understand the doc before editing
|
|
360
|
+
2. **Always `get/text` before editing a range** — get real content, never guess
|
|
361
|
+
3. **Always `find/text` before `replace/text`** — never guess positions
|
|
362
|
+
4. **Process replacements end-to-start** — preserve positions
|
|
363
|
+
5. **`expectedText` from actual API response** — copy-paste, never write from memory
|
|
364
|
+
6. **Tables inflate paragraph counts** — a 5-row table = 20+ paragraphs. NEVER count manually.
|
|
365
|
+
7. **Images/charts appear as `/` in text** — expectedText will contain `/`
|
|
366
|
+
8. **get/text caps at 8,000 chars by default** (bump via `maxChars`, up to 50,000). Use `/word/get/document-structure` + paragraph/range reads for precise targeting instead of dumping everything.
|
|
367
|
+
9. **Insert separator after lists** before tables to prevent format inheritance
|
|
368
|
+
10. **Use `<!!IgnoreValidation!!>` as last resort only** — if validation fails, re-read the document first
|
|
369
|
+
11. **`characterIndex` goes stale after any edit** — positions shift when you insert or delete text. Re-read positions with `find/text` or `get/paragraph-bounds` before each operation. Prefer `paragraphStart`/`paragraphEnd` anchors over `characterIndex` for multi-step edits. For `/word/apply/style`, ALWAYS use `paragraphStart`/`paragraphEnd` anchors with a fresh paragraph number from `/word/find/text` — NEVER use `characterIndex` anchors.
|
|
370
|
+
12. **Paragraph numbers go stale after any insert/delete** — after `/word/insert/html` or any edit that adds/removes content, ALL previously known paragraph numbers are invalid. Call `/word/find/text` to get the fresh paragraph number before using `/word/get/paragraph-bounds` or `/word/apply/style`.
|
|
371
|
+
13. **New paragraphs inherit preceding style** — after inserting near a heading, always call `/word/apply/style` to set the correct style on the new paragraph.
|
|
372
|
+
14. **Update TOC after heading changes** — after adding, removing, or renaming headings, update the Table of Contents. **Do NOT use UIA for this** — use the API:
|
|
373
|
+
- Both platforms: `/word/update/toc`
|
|
374
|
+
15. **Match existing formatting when adding sections** — documents created by doc-gen use explicit inline formatting, NOT Word's built-in styles. Two-step process (see SKILL.md step 3b→4 for full details):
|
|
375
|
+
- **Step A:** Use `/word/insert/html` for structure — do NOT rely on inline CSS font-size/color (they are not applied reliably)
|
|
376
|
+
- **Step B:** Call `/word/format/text` on EVERY inserted paragraph with the theme's exact `fontSize`, `fontName`, `textColorHex` (look up the theme formatting table in SKILL.md step 3b)
|
|
377
|
+
- After formatting, apply heading styles (`Heading 1`, `Heading 2`) with `/word/apply/style` so the TOC includes them
|
|
378
|
+
- **DO NOT SKIP Step B** — without it, inserted content will have wrong font sizes and missing colors
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Word API — Expert
|
|
2
|
+
|
|
3
|
+
C# scripting, position troubleshooting, shape management, and edge cases. Load when basic and advanced endpoints aren't enough.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Execute C# Script (Windows Only)
|
|
8
|
+
|
|
9
|
+
Runs custom C# code in Word's COM context. Use for operations not available via API endpoints.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
endpoint: "/word/execute-script"
|
|
13
|
+
body: {
|
|
14
|
+
"filePath": "...",
|
|
15
|
+
"script": "for (int i = 1; i <= document.Paragraphs.Count; i++) {\n dynamic para = document.Paragraphs[i];\n if (para.Range.Text?.Contains(\"TODO\") == true) {\n para.Range.Font.Bold = true;\n }\n}\nreturn \"Done\";"
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Available Global Variables
|
|
20
|
+
|
|
21
|
+
| Variable | Type | Description |
|
|
22
|
+
|----------|------|-------------|
|
|
23
|
+
| `document` | dynamic | Word Document COM object |
|
|
24
|
+
| `selection` | dynamic | Current Selection object |
|
|
25
|
+
| `range` | dynamic | Document Range object |
|
|
26
|
+
| `application` | dynamic | Word Application object |
|
|
27
|
+
|
|
28
|
+
### Critical Rules
|
|
29
|
+
|
|
30
|
+
- Keep scripts under 30-50 lines
|
|
31
|
+
- **NEVER reassign globals** (`document`, `selection`, etc.)
|
|
32
|
+
- **NO LINQ on COM collections** — use manual for loops
|
|
33
|
+
- Must return a string
|
|
34
|
+
- 30-second timeout
|
|
35
|
+
|
|
36
|
+
### When to Use Script vs API
|
|
37
|
+
|
|
38
|
+
| Task | Use |
|
|
39
|
+
|------|-----|
|
|
40
|
+
| Insert/format/replace text | API endpoints |
|
|
41
|
+
| Insert/format tables | API endpoints |
|
|
42
|
+
| Add rows/columns to tables | **execute-script** |
|
|
43
|
+
| Merge table cells | **execute-script** |
|
|
44
|
+
| Complex conditional formatting | **execute-script** |
|
|
45
|
+
| Loops over paragraphs | **execute-script** |
|
|
46
|
+
|
|
47
|
+
### Common Patterns
|
|
48
|
+
|
|
49
|
+
**Add row at end of table:**
|
|
50
|
+
```csharp
|
|
51
|
+
if (document.Tables.Count > 0) {
|
|
52
|
+
dynamic table = document.Tables[1];
|
|
53
|
+
table.Rows.Add();
|
|
54
|
+
return "Row added";
|
|
55
|
+
}
|
|
56
|
+
return "No tables";
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Insert row BEFORE specific row:**
|
|
60
|
+
```csharp
|
|
61
|
+
if (document.Tables.Count > 0) {
|
|
62
|
+
dynamic table = document.Tables[1];
|
|
63
|
+
table.Rows.Add(table.Rows[2]); // Before row 2
|
|
64
|
+
return "Row inserted";
|
|
65
|
+
}
|
|
66
|
+
return "No tables";
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Add column at end / before specific column:**
|
|
70
|
+
```csharp
|
|
71
|
+
// At end
|
|
72
|
+
table.Columns.Add();
|
|
73
|
+
table.AutoFitBehavior(2); // wdAutoFitWindow
|
|
74
|
+
|
|
75
|
+
// Before column 2
|
|
76
|
+
table.Columns.Add(table.Columns[2]);
|
|
77
|
+
table.AutoFitBehavior(2);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Fill cells:**
|
|
81
|
+
```csharp
|
|
82
|
+
for (int i = 1; i <= table.Rows.Count; i++) {
|
|
83
|
+
table.Rows[i].Cells[1].Range.Text = "Cell " + i;
|
|
84
|
+
}
|
|
85
|
+
return "Cells filled";
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Format headings by pattern:**
|
|
89
|
+
```csharp
|
|
90
|
+
for (int i = 1; i <= document.Paragraphs.Count; i++) {
|
|
91
|
+
dynamic para = document.Paragraphs[i];
|
|
92
|
+
string text = para.Range.Text ?? "";
|
|
93
|
+
if (text.StartsWith("Chapter")) {
|
|
94
|
+
para.Range.Style = document.Styles["Heading 1"];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return "Headings formatted";
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Create Table of Contents:**
|
|
101
|
+
```csharp
|
|
102
|
+
dynamic tocRange = document.Range(0, 0);
|
|
103
|
+
tocRange.Text = "Table of Contents\r";
|
|
104
|
+
tocRange.Font.Bold = 1;
|
|
105
|
+
tocRange.Font.Size = 16;
|
|
106
|
+
int insertPos = tocRange.End;
|
|
107
|
+
dynamic insertPoint = document.Range(insertPos, insertPos);
|
|
108
|
+
document.TablesOfContents.Add(insertPoint, true, 1, 3, false, Type.Missing, true, true, Type.Missing, true);
|
|
109
|
+
return "TOC created";
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Delete empty paragraphs:**
|
|
113
|
+
```csharp
|
|
114
|
+
int count = 0;
|
|
115
|
+
for (int i = document.Paragraphs.Count; i >= 1; i--) {
|
|
116
|
+
dynamic para = document.Paragraphs[i];
|
|
117
|
+
if (string.IsNullOrWhiteSpace(para.Range.Text?.Replace("\r", ""))) {
|
|
118
|
+
para.Range.Delete();
|
|
119
|
+
count++;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return $"Deleted {count} empty paragraphs";
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Style Assignment
|
|
126
|
+
|
|
127
|
+
```csharp
|
|
128
|
+
// CORRECT — direct property assignment
|
|
129
|
+
para.Range.Style = document.Styles["Heading 1"];
|
|
130
|
+
|
|
131
|
+
// WRONG — set_Style() fails with dynamic COM
|
|
132
|
+
para.Range.set_Style("Heading 1");
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Enum Usage
|
|
136
|
+
|
|
137
|
+
Use Word enums WITHOUT `Word.` prefix:
|
|
138
|
+
```csharp
|
|
139
|
+
para.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
|
|
140
|
+
range.Font.Underline = WdUnderline.wdUnderlineSingle;
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Shape Management (via Script)
|
|
146
|
+
|
|
147
|
+
The `/word/insert/textbox` API doesn't support naming or listing text boxes. Use scripts for advanced management.
|
|
148
|
+
|
|
149
|
+
**Create named text box:**
|
|
150
|
+
```csharp
|
|
151
|
+
dynamic shape = document.Shapes.AddTextbox(1, 50, 100, 150, 40);
|
|
152
|
+
shape.TextFrame.TextRange.Text = "Callout text";
|
|
153
|
+
shape.Name = "CalloutBox_1";
|
|
154
|
+
return $"Created: {shape.Name}";
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**List all text boxes:**
|
|
158
|
+
```csharp
|
|
159
|
+
string info = "Text Boxes:\n";
|
|
160
|
+
int count = 0;
|
|
161
|
+
for (int i = 1; i <= document.Shapes.Count; i++) {
|
|
162
|
+
dynamic shape = document.Shapes[i];
|
|
163
|
+
if (shape.Type == 17) { // msoTextBox
|
|
164
|
+
count++;
|
|
165
|
+
string text = "";
|
|
166
|
+
try { text = shape.TextFrame.TextRange.Text.Trim(); } catch { }
|
|
167
|
+
info += $"[{i}] Name: {shape.Name}, Text: {text}\n";
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return info + $"Total: {count}";
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Delete by name:**
|
|
174
|
+
```csharp
|
|
175
|
+
for (int i = document.Shapes.Count; i >= 1; i--) {
|
|
176
|
+
if (document.Shapes[i].Name == "CalloutBox_1") {
|
|
177
|
+
document.Shapes[i].Delete();
|
|
178
|
+
return "Deleted";
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return "Not found";
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Delete all text boxes:**
|
|
185
|
+
```csharp
|
|
186
|
+
int count = 0;
|
|
187
|
+
for (int i = document.Shapes.Count; i >= 1; i--) {
|
|
188
|
+
if (document.Shapes[i].Type == 17) {
|
|
189
|
+
document.Shapes[i].Delete();
|
|
190
|
+
count++;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return $"Deleted {count}";
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Always iterate in **reverse** when deleting (indices shift).
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Position Troubleshooting
|
|
201
|
+
|
|
202
|
+
### Example: Insert after paragraph 1
|
|
203
|
+
|
|
204
|
+
Document: `Para1␍Para2␍` → Goal: `Para1␍NewPara␍Para2␍`
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"anchor": "paragraphEnd", "paragraph": 1,
|
|
209
|
+
"contextBefore": "Para1",
|
|
210
|
+
"contextAfter": "␍Para2"
|
|
211
|
+
}
|
|
212
|
+
// text: "NewPara", insertMode: "NewParagraph"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Example: Insert before paragraph 2
|
|
216
|
+
|
|
217
|
+
Document: `Title␍Body␍` → Goal: `Title␍Subtitle␍Body␍`
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"anchor": "paragraphStart", "paragraph": 2,
|
|
222
|
+
"contextBefore": "Title␍",
|
|
223
|
+
"contextAfter": "Body"
|
|
224
|
+
}
|
|
225
|
+
// text: "Subtitle", insertMode: "NewParagraph"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Example: Delete middle paragraph
|
|
229
|
+
|
|
230
|
+
`Para1␍Para2␍Para3␍` → `Para1␍Para3␍`
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"start": { "anchor": "paragraphStart", "paragraph": 2 },
|
|
235
|
+
"end": { "anchor": "paragraphStart", "paragraph": 3 },
|
|
236
|
+
"expectedText": "Para2␍"
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Example: Delete last paragraph
|
|
241
|
+
|
|
242
|
+
`Para1␍Para2␍Para3␍` → `Para1␍Para2␍`
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"start": { "anchor": "paragraphEnd", "paragraph": 2 },
|
|
247
|
+
"end": { "anchor": "documentEnd" },
|
|
248
|
+
"expectedText": "␍Para3"
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Common Mistakes
|
|
253
|
+
|
|
254
|
+
| Mistake | Fix |
|
|
255
|
+
|---------|-----|
|
|
256
|
+
| Insert text contains a leading/trailing ␍ | Send content only; `NewParagraph` adds the boundary |
|
|
257
|
+
| `paragraphEnd` contextAfter missing ␍ | contextAfter MUST start with ␍ |
|
|
258
|
+
| `paragraphStart` contextBefore missing ␍ | contextBefore MUST end with ␍ (except para 1) |
|
|
259
|
+
| `documentEnd` contextAfter not empty | contextAfter must be `""` for documentEnd |
|
|
260
|
+
| Deleting last para with paragraphStart→documentEnd | Leaves empty para. Use paragraphEnd N-1→documentEnd |
|
|
261
|
+
|
|
262
|
+
### Quick Debug Checklist
|
|
263
|
+
|
|
264
|
+
1. Re-read target with `/word/get/text`
|
|
265
|
+
2. Check contextBefore/contextAfter against actual content
|
|
266
|
+
3. Copy context/expectedText from the fresh read; never add ␍ to insert text
|
|
267
|
+
4. Use `/word/get/paragraph-bounds` for exact positions
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Emoji in HTML (macOS)
|
|
272
|
+
|
|
273
|
+
NEVER use raw Unicode emoji in `/word/insert/html` — they get garbled on macOS (AppleScript encoding issues).
|
|
274
|
+
|
|
275
|
+
**Always use HTML numeric entities:**
|
|
276
|
+
|
|
277
|
+
| Emoji | Entity |
|
|
278
|
+
|-------|--------|
|
|
279
|
+
| Party popper | `🎉` |
|
|
280
|
+
| Birthday cake | `🎂` |
|
|
281
|
+
| Confetti | `🎈` |
|
|
282
|
+
| Check mark | `✅` |
|
|
283
|
+
| Star | `⭐` |
|
|
284
|
+
| Musical note | `🎵` |
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Select Range
|
|
289
|
+
|
|
290
|
+
Sets Word's selection (rarely needed — most operations accept range directly).
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
endpoint: "/word/selection"
|
|
294
|
+
body: {
|
|
295
|
+
"filePath": "...",
|
|
296
|
+
"range": {
|
|
297
|
+
"start": { "anchor": "paragraphStart", "paragraph": 2 },
|
|
298
|
+
"end": { "anchor": "paragraphEnd", "paragraph": 2 },
|
|
299
|
+
"expectedText": "Second paragraph"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
```
|