Metadata-Version: 2.4
Name: word-vba
Version: 0.5.0
Summary: Edit, export and import Word VBA code from the command line. Thin entry-point wrapper for vba-edit.
Author-email: Markus Killer <m.killer@langui.ch>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/markuskiller/vba-edit
Project-URL: Repository, https://github.com/markuskiller/vba-edit
Project-URL: Changelog, https://github.com/markuskiller/vba-edit/blob/main/CHANGELOG.md
Keywords: vba,word,office,automation,macro
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Office/Business :: Office Suites
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: vba-edit==0.5.0

# word-vba belongs to [vba-edit](https://github.com/markuskiller/vba-edit) CLI Tools

**Edit VBA code in VS Code, PyCharm, Wing IDE, or any editor you love.** Real-time sync with **MS WORD**. Git-friendly. No more VBA editor pain.

[![CI](https://github.com/markuskiller/vba-edit/actions/workflows/test.yaml/badge.svg)](https://github.com/markuskiller/vba-edit/actions/workflows/test.yaml)
[![PyPI - Version](https://img.shields.io/pypi/v/vba-edit.svg)](https://pypi.org/project/vba-edit)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vba-edit.svg)](https://pypi.org/project/vba-edit)
[![Platform](https://img.shields.io/badge/platform-windows-blue.svg)](https://pypi.org/search/?q=vba-edit&o=&c=Operating+System+%3A%3A+Microsoft+%3A%3A+Windows)
[![Downloads](https://img.shields.io/pypi/dm/vba-edit)](https://www.pypiplus.com/project/vba-edit/)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

This is a thin entry-point package for [vba-edit](https://pypi.org/project/vba-edit/). Installing `word-vba` gives you the `word-vba` command and automatically installs the `vba-edit` core package.

[![word-vba downloads](https://img.shields.io/pypi/dm/word-vba?label=word-vba%20downloads)](https://www.pypiplus.com/project/word-vba/)

## Quick Start

### RECOMMENDED: Via [``uvx``](https://docs.astral.sh/uv/guides/tools/)

```bash
uvx word-vba edit -f myfile.docm --vba-directory .\src\VBA
```

> **Note:** The ``uvx`` command invokes a tool without installing it — same as: ``uv tool run word-vba``

### 30-Second Demo
```bash
# Start editing (uses active Word document)
uvx word-vba edit

# That's it! Edit the .bas/.cls files in your editor. Save = Sync.
```

## How It Works
<pre>
                        <--- vba-edit --->

    MS WORD                  COMMANDS              Your favourite
                                v                       Editor

+------------------+                            +------------------+
|                  |                            |                  |
|   VBA Project    |   <---   EDIT*   (once ->) |  (e.g. VS CODE)  | 
|                  |                            |                  |     latest
|  (Office VBA-    |          EXPORT      --->  |   .bas           |  <- AI coding-  
|    Editor)       |                            |   .cls           |     assistants
|                  |   <---   IMPORT            |   .frm           |   
|                  |                            |  (.frx binary)   | 
|                  |                            |                  |     optional
|                  |                            |  [.toml]         |  <- support for 
|                  |                            |                  |     references
+------------------+                            +------------------+
                                                         v
                                                +------------------+
                                                |                  |
 * watches & syncs                              |    (e.g. Git)    |
   back to Office                               |  version control |
   VBA-Editor live                              |                  |
   on save [CTRL+S]                             |                  |
                                                +------------------+
</pre>


## Install

```bash
pip install word-vba
```

> **Note:** Installing `word-vba` also installs the `vba-edit` core package, which provides entry points for all supported Office apps (`excel-vba`, `word-vba`, `powerpoint-vba`, `access-vba`).

## Usage

> All commands below work with both `word-vba <command>` (installed) and `uvx word-vba <command>` (no install required).

| Command | What it does |
|---------|-------------|
| `word-vba edit` | Start live editing |
| `word-vba export` | One-time export |
| `word-vba import` | One-time import |
| `word-vba export --open-folder --keep-open` | Export and open folder in explorer, keep document open for inspection |
| `word-vba export --force-overwrite` | Export without confirmation prompts |
| `word-vba references list` | List VBA library references |
| `word-vba check` | Verify status of *Trust access* to the VBA project object model |

> 💡 **Complete Option Matrix**: available **[here](https://langui.ch/current-projects/vba-edit/#OptionMatrix)**

For full documentation see [github.com/markuskiller/vba-edit](https://github.com/markuskiller/vba-edit).
