Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>VBA Office SyncNew to Visual Studio Code? Get it now.
VBA Office Sync

VBA Office Sync

Davy Kyndt

|
4 installs
| (0) | Free
Install the extension, pick a macro-enabled Office file from the bottom toolbar, edit VBA in VS Code, save, and test in Office.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VBA Office Sync

Install the extension, use the bottom toolbar to pick your macro-enabled Office file, edit the extracted VBA files in VS Code, save them, and test your macros back in Office.

Supports Excel, Word, PowerPoint, and Access files on Windows through Office COM automation.

What's new in v0.0.10

  • Improved VBA Sync sidebar visibility in the Activity Bar.
  • Added VBA Sync Quick Actions fallback view in Explorer.

What's new in v0.0.9

  • Added VBA Office Sync: Unload Office File and Clean Folders.
  • Added a status bar button: VBA Unload.
  • Unload stops active save sync, clears the remembered Office file, and removes the extracted runtime source folder for that file.
  • Added VBA Office Sync: Start Session for one-click setup (choose file, prepare source folder, start save sync).
  • Added VBA Office Sync: Run Health Check to validate runtime prerequisites and current source state.
  • Added a dedicated VBA Sync sidebar with quick actions.

Simple workflow

  1. Install the extension.
  2. Use the toolbar at the bottom of VS Code to choose a macro-enabled Office file.
  3. Let the extension extract the VBA code for you.
  4. Edit the generated .bas, .cls, .frm, or document module files in VS Code.
  5. Save your changes.
  6. Test the updated macros in the Office file.

The extension provides these commands:

  • VBA Office Sync: Choose Office File
  • VBA Office Sync: Start Session
  • VBA Office Sync: Extract VBA Files
  • VBA Office Sync: Import VBA Files
  • VBA Office Sync: Start Save Sync
  • VBA Office Sync: Stop Save Sync
  • VBA Office Sync: Sync Now
  • VBA Office Sync: Unload Office File and Clean Folders
  • VBA Office Sync: Run Health Check

Recommended start:

  1. Run VBA Office Sync: Start Session.
  2. Edit files in the opened source folder.
  3. Save files to sync automatically.

Output structure

When you extract, the extension creates a temporary folder with a stable name under your system temp directory, for example %TEMP%/vba-office-sync/<WorkbookName>-<id>, with:

  • modules/ for .bas, .cls, .frm components.
  • documents/ for worksheet and ThisWorkbook module code.
  • .vba-sync.json manifest with extraction metadata.

Requirements

  • Windows (uses Office COM automation).
  • Installed desktop Office apps for the file types you use.
  • In each host app Trust Center, enable Trust access to the VBA project object model.

Supported host files

  • Excel: .xlsm, .xlsb, .xlam, .xltm
  • Word: .docm, .dotm
  • PowerPoint: .pptm, .potm, .ppsm, .ppam
  • Access: .accdb, .accde, .mdb

Important behavior

  • Import removes and recreates non-document modules (.bas, .cls, .frm) from the extracted files.
  • Import updates existing document modules (sheet modules and ThisWorkbook) by replacing their code.
  • The workbook is saved during import.
  • Import creates timestamped backup/autosave copies in <temp-source-folder>/backups before applying changes.
  • Import aborts before deleting modules when the selected source folder is missing .vba-sync.json or has no importable VBA files.
  • Extract/import/auto-sync use an automatic source folder in the system temp directory.
  • The selected workbook is remembered, so start/sync/import do not ask for the file again.
  • Auto Sync On Save watches the extracted folder and imports automatically when you save VBA source files.
  • Unload asks for confirmation before cleanup and then removes the extracted folder tree for the selected file.

Usage

  1. Run VBA Office Sync: Extract VBA Files.
  2. Choose workbook.
  3. Edit extracted files in VS Code.
  4. Run VBA Office Sync: Import VBA Files.
  5. Choose workbook.

Auto Sync On Save

  1. Run VBA Office Sync: Start Save Sync.
  2. Choose workbook.
  3. Save .bas, .cls, or .frm files in that folder.
  4. The extension automatically imports changes into the workbook.
  5. Use VBA Office Sync: Sync Now any time you want an immediate import.
  6. Run VBA Office Sync: Stop Save Sync when done.

Clean up after editing

  1. Run VBA Office Sync: Unload Office File and Clean Folders.
  2. Confirm Unload and Clean.
  3. The extension stops save sync (if running), forgets the selected Office file, and removes that file's extracted source folder.

Clickable UI (no Command Palette required)

  • Status bar buttons:
    • VBA Select Workbook
    • VBA Choose File
    • VBA Files
    • VBA Start Session
    • VBA Start Sync
    • VBA Sync Now
    • VBA Stop Sync
    • VBA Unload
    • VBA Health
  • Explorer title bar actions also include the same commands.
  • Activity Bar now includes a VBA Sync sidebar with a Quick Actions panel.
  • If the Activity Bar container is hidden in your VS Code layout, use the Explorer fallback view: VBA Sync Quick Actions.

Folder convention:

  • Workbook: C:\Work\Budget.xlsm
  • Extracted temp folder used automatically: %TEMP%\vba-office-sync\Budget-<id>

Notes:

  • This extension is Windows-only because it depends on Office COM automation.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft