vba-extractor

Extract VBA macros from Microsoft Office documents using olevba.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/tylermorganme/crop_plan_2025 --skill vba-extractor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vba-extractor
Source: https://github.com/tylermorganme/crop_plan_2025/tree/main/.claude/vba-extractor
Command: npx skills add https://github.com/tylermorganme/crop_plan_2025 --skill vba-extractor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires oletools, and includes scripts (resource) components.

What problem does it solve?

Solves the challenge of reading and extracting VBA macros from Microsoft Office documents.

Core Features & Use Cases

  • Extracts VBA modules from macro-enabled Office files (.xlsm, .xlsb, .docm, .pptm) and legacy formats (.xls, .doc).
  • Outputs full VBA source code per module with separation markers for easy review.
  • Use Case: Security analysts audit a batch of Office documents to inventory embedded macros.

Quick Start

Use the vba-extractor to extract VBA code from a sample file 'document.xlsm'.

Frequently Asked Questions about vba-extractor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract VBA macros from Office files like .xlsm or .docm?

To extract VBA macros from Office files, you need a tool that reads macro-enabled formats including .xlsm, .xlsb, .docm, .pptm, and legacy .xls/.doc files. The vba-extractor uses the oletools package to output full VBA source code per module with separation markers for easy review.

What's the best way to audit embedded macros across multiple Office documents?

Auditing embedded macros across multiple Office documents is done by batch extracting VBA modules from macro-enabled and legacy formats. The vba-extractor processes .xlsm, .xlsb, .docm, and .pptm files, outputting full source code per module so analysts can inventory and review all macros efficiently.

Do I need Python and oletools to read VBA source code from Excel files?

Yes, you need Python and the oletools package to read VBA source code from Excel files using this approach. The extractor relies on the olevba tool from oletools to parse and extract VBA modules from .xlsm, .xlsb, and legacy .xls documents.

Can I extract VBA code from legacy .xls and .doc files or only macro-enabled formats?

You can extract VBA code from both macro-enabled formats and legacy files. The extractor supports .xlsm, .xlsb, .docm, .pptm as well as legacy .xls and .doc formats, allowing analysts to inspect embedded macros across a wide range of Microsoft Office document types.

Does olevba work with PowerPoint .pptm files for macro extraction?

Yes, olevba works with PowerPoint .pptm files for macro extraction. The extractor supports .pptm along with .xlsm, .xlsb, .docm, and legacy formats, outputting full VBA source code per module with separation markers for straightforward review of embedded macros.