Read module
xlide_read_moduleRetrieve VBA module source from Office files, optionally limited to a line range. Get a content token to ensure safe concurrent writes.
Instructions
The canonical way to read VBA. Returns a module's source as the VBA editor shows it, with the attribute header stripped, plus a content_token. Pass that token back as expected_content_token when you write, and the write is refused if anything changed the module in between. start_line and end_line read a slice of a long module; both are 1-based and inclusive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | No | Last line to return. 0 means the end. | |
| file_path | Yes | Absolute path to the Office file. | |
| start_line | No | First line to return. 0 means the start. | |
| module_name | Yes | Module name, matched without case. | |
| include_header | No | Include the Attribute VB_* header. Off by default: the header is managed for you on write, and editing it by hand is how a module loses its binding to a sheet or a form. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||