generate_fsharp_script
Convert a Word document into an F# script that rebuilds an equivalent file via dotnet fsi. Use it to inspect structure or extend with styles, tables, images, headers/footers, comments, and more.
Instructions
Reads an existing Word document and returns a self-contained F# script (using Kookerella.FsWordDsl) that rebuilds an equivalent file when run via dotnet fsi. Useful for explaining how a file is structured, or as a starting point for a caller who wants the library's full feature set (named styles, tables, images, headers/footers, comments, track changes, content controls, etc.) beyond what create_document exposes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to an existing .docx/.docm file to reverse-engineer into F# source. | |
| outputFileName | Yes | The output filename the generated script should save its rebuilt file to, e.g. "output.docx". |