pyOpenVBA
Pure-Python reader/writer for VBA macros embedded in Excel / PowerPoint / Word files. Zero dependencies, deterministic round-trip, safe on protected and signed projects.
File Explorer
- ci.yml
- excel_macro_test.yml
- publish.yml
- 01_rainbow_grid.xlsm
- 02_bouncing_ball.xlsm
- 03_sine_wave.xlsm
- 04_mandelbrot.xlsm
- 05_huge_module.xlsm
- bake_huge_module_demo.py
- bake_visual_demos.py
- access_read_demo.py
- all_module_types_demo.py
- create_files.py
- create_new_excel_with_class_demo.py
- create_new_with_class_demo.py
- create_new_word_with_class_demo.py
- demo.md
- inject_all_module_types.py
- inject_xls_demo.py
- inject_xlsb_with_class_demo.py
- push_demo_module.py
- test_macro_workbook.xlsm
- bake_access_phase5f_demo.py
- bake_access_phase5f_diag.py
- bake_access_phase5f_diag_C.py
- bake_access_phase5f_diag_D.py
- bake_access_phase5f_diag_rename.py
- bake_access_phase5h_diag_delete_add.py
- bake_access_phase5h_diag_K_100line.py
- bake_access_phase5h_diag_pcode_invalidate.py
- _diag.py
- _diag2.py
- _diag3.py
- _diag_compare_project_ini.py
- _diag_compress_roundtrip.py
- _diag_find_name_refs.py
- _diag_force_lz.py
- _diag_rename_byte_diff.py
- _diag_rename_dir_diff.py
- _isolate.py
- M.bas
- 01_simple_multiline_replace.accdb
- 02_class_module_body_swap.accdb
- 03_full_source_with_own_header.accdb
- 04_push_access_bulk.accdb
- 05_rename_then_replace.accdb
- diag_A_noop_save.accdb
- diag_B_same_length_replace.accdb
- diag_C_byte_identical_rewrite.accdb
- diag_D_identical_source_rewrite.accdb
- diag_E_rename_only.accdb
- diag_F_rename_then_set_same.accdb
- diag_G_set_then_rename.accdb
- diag_H_delete_only.accdb
- diag_I_add_catalog_only.accdb
- diag_J_delete_then_add_with_body.accdb
- diag_K_100line_write.accdb
- diag_L_tombstone_rU.accdb
- diag_M_tombstone_CAFE.accdb
- diag_N_100line_plus_invalidate.accdb
- fresh_renamed_m.accdb
- access_re_body_diff.py
- access_re_catalog.py
- access_re_chain.py
- access_re_compare_pcode_headers.py
- access_re_diff_vba_project.py
- access_re_disasm_smoke.py
- access_re_dump_68_1.py
- access_re_dump_pre_cafe.py
- access_re_dump_rows.py
- access_re_find_cafe.py
- access_re_find_idents.py
- access_re_find_string_intern.py
- access_re_find_vba_project.py
- access_re_fingerprint.py
- access_re_inventory.py
- access_re_list_pcode_rows.py
- access_re_lval.py
- access_re_pcode_diff.py
- access_re_trailer_cookie.py
- access_re_trailer_dump.py
- access_re_walk.py
- accdb_write.py
- array_probe.bas
- bake_access_template.py
- build_matrix.ps1
- build_matrix.py
- builtins_probe.bas
- collision_probe.bas
- construct_matrix.bas
- dim_probe.bas
- module_ops.ps1
- README.md
- rename_probe.py
- rewrite_module.py
- vba_compile.py
- verify_compiler.py
- verify_execution.py
- verify_identity.py
- batch.py
- compile_oracle.py
- hash_probe.py
- identifier_hashes.json
- pcode_asm.py
- pcode_decompile.py
- pcode_hash.py
- pcode_names.py
- pcode_source.py
- pcode_types.py
- README.md
- roundtrip.py
- semantic_roundtrip.py
- sweep.py
- access_pcode_re.md
- architecture.md
- changelog.md
- ms-ovba-implementation-guide.md
- ms-ovba-implementation-guide_v2.md
- MS-OVBA_official_specification.pdf
- msaccess_lessons_learned.md
- pcode_reference.md
- roadmap.md
- xlsm_feature_completeness_gates.md
- ListVisibleWindows.ps1
- Minimize.ps1
- MinimizeCurrentWindow.ps1
- Screenshot.ps1
- _cookie.txt
- _diff_accdb.py
- _diff_output.txt
- _dump_68_1.txt
- _dump_rows.txt
- _fp_output.txt
- _pcode_diff.txt
- _str_intern.txt
- bake_empty_template.py
- bake_excel_template.py
- bake_header_fix_live_tests.py
- bake_powerpoint_template.py
- bake_powerpoint_test_fixtures.py
- bake_word_template.py
- bake_word_test_fixtures.py
- bake_xlam_template.py
- bake_xlsb_template.py
- build_excel_fixtures.py
- build_excel_verification_set.py
- run_excel_fixtures.py
- seed_fuzz_corpus.py
- blank_database.accdb
- blank_database_module.accdb
- blank_document.docm
- blank_excel_addin.xlam
- blank_presentation.pptm
- blank_workbook.xlsb
- blank_workbook.xlsm
- __init__.py
- __init__.py
- __main__.py
- _host.py
- access_read.py
- cfb.py
- excel.py
- exceptions.py
- powerpoint.py
- vba.py
- vba_pcode.py
- word.py
- Module1.bas
- Class1.cls
- Module1.bas
- empty.bin
- live_bitflip_00.bin
- live_bitflip_01.bin
- live_bitflip_02.bin
- live_bitflip_03.bin
- one_byte.bin
- partial_signature.bin
- random_2k_seed_1.bin
- random_2k_seed_2.bin
- random_512_seed_3.bin
- signature_plus_zeros.bin
- truncated_header.bin
- compressed_then_garbage.bin
- empty.bin
- header_announces_overlong_chunk.bin
- one_zero.bin
- signature_only.bin
- signature_short_header.bin
- wrong_signature.bin
- empty.bin
- live_bitflip_00.bin
- live_bitflip_01.bin
- live_bitflip_02.bin
- live_bitflip_03.bin
- live_bitflip_04.bin
- live_bitflip_05.bin
- one_byte.bin
- truncated_record_header.bin
- version_record_truncated.bin
- binary_in_text.bin
- empty.bin
- garbage_text.bin
- live_bitflip_00.bin
- live_bitflip_01.bin
- live_bitflip_02.bin
- live_bitflip_03.bin
- live_bitflip_04.bin
- live_bitflip_05.bin
- only_workspace.bin
- unterminated_section_header.bin
- empty.bin
- live_bitflip_00.bin
- live_bitflip_01.bin
- live_bitflip_02.bin
- live_bitflip_03.bin
- live_bitflip_04.bin
- live_bitflip_05.bin
- mbcs_only_no_terminator.bin
- mbcs_terminator_no_unicode.bin
- mbcs_terminator_truncated_unicode.bin
- single_null.bin
- README.md
- Class1.bas.txt
- manifest.json
- Module1.bas.txt
- Module2.bas.txt
- Class1.bas.txt
- manifest.json
- Module1.bas.txt
- Module2.bas.txt
- Class1.bas.txt
- manifest.json
- Module1.bas.txt
- Module2.bas.txt
- Class1.bas.txt
- manifest.json
- Module1.bas.txt
- Module2.bas.txt
- _com_mutate.ps1
- _corpus_generate.ps1
- _oracle.ps1
- _write_ovba_only.accdb
- _write_ovba_zero.accdb
- _write_same.accdb
- _write_shrink.accdb
- _write_test.accdb
- module_spanning_pages.accdb
- New Microsoft Access Database.accdb
- two_modules_one_page.accdb
- freshly_touched.xlsm
- large_vba_module.xlsm
- sheet_only_module_test.xlsm
- test_macro_workbook.xlsb
- test_macro_workbook.xlsm
- workbook_only_module_test.xlsm
- workbook_with_password_protected_vba_modules.xlsm
- xls_test.xls
- xlsm_file_with_no_vba_entered_yet.xlsm
- large_vba_module.pptm
- live_create_test.pptm
- multi_module.pptm
- Presentation1.pptm
- simple_macros.pptm
- Doc1.docm
- document_events.docm
- large_vba_module.docm
- live_create_test.docm
- multi_module_doc.docm
- simple_macros.docm
- 010__empty_StdModule_M__add.accdb
- 010__empty_StdModule_M__delete.accdb
- 010__empty_StdModule_M__modify_long.accdb
- 010__empty_StdModule_M__modify_short.accdb
- 010__empty_StdModule_M__rename.accdb
- 011__empty_StdModule_AB__add.accdb
- 011__empty_StdModule_AB__delete.accdb
- 011__empty_StdModule_AB__modify_long.accdb
- 011__empty_StdModule_AB__modify_short.accdb
- 011__empty_StdModule_AB__rename.accdb
- 012__empty_StdModule_ABC__add.accdb
- 012__empty_StdModule_ABC__delete.accdb
- 012__empty_StdModule_ABC__modify_long.accdb
- 012__empty_StdModule_ABC__modify_short.accdb
- 012__empty_StdModule_ABC__rename.accdb
- 013__empty_StdModule_Mod1__add.accdb
- 013__empty_StdModule_Mod1__delete.accdb
- 013__empty_StdModule_Mod1__modify_long.accdb
- 013__empty_StdModule_Mod1__modify_short.accdb
- 013__empty_StdModule_Mod1__rename.accdb
- 014__empty_StdModule_Module1__add.accdb
- 014__empty_StdModule_Module1__delete.accdb
- 014__empty_StdModule_Module1__modify_long.accdb
- 014__empty_StdModule_Module1__modify_short.accdb
- 014__empty_StdModule_Module1__rename.accdb
- 015__empty_StdModule_LongName__add.accdb
- 015__empty_StdModule_LongName__delete.accdb
- 015__empty_StdModule_LongName__modify_long.accdb
- 015__empty_StdModule_LongName__modify_short.accdb
- 015__empty_StdModule_LongName__rename.accdb
- 016__empty_StdModule_UnicodeA__add.accdb
- 016__empty_StdModule_UnicodeA__delete.accdb
- 016__empty_StdModule_UnicodeA__modify_long.accdb
- 016__empty_StdModule_UnicodeA__modify_short.accdb
- 016__empty_StdModule_UnicodeA__rename.accdb
- 020__empty_ClassModule_C__add.accdb
- 020__empty_ClassModule_C__delete.accdb
- 020__empty_ClassModule_C__modify_long.accdb
- 020__empty_ClassModule_C__modify_short.accdb
- 020__empty_ClassModule_C__rename.accdb
- 021__empty_ClassModule_Class1__add.accdb
- 021__empty_ClassModule_Class1__delete.accdb
- 021__empty_ClassModule_Class1__modify_long.accdb
- 021__empty_ClassModule_Class1__modify_short.accdb
- 021__empty_ClassModule_Class1__rename.accdb
- 030__sub_A_empty__add.accdb
- 030__sub_A_empty__delete.accdb
- 030__sub_A_empty__modify_long.accdb
- 030__sub_A_empty__modify_short.accdb
- 030__sub_A_empty__rename.accdb
- 031__sub_B_empty__add.accdb
- 031__sub_B_empty__delete.accdb
- 031__sub_B_empty__modify_long.accdb
- 031__sub_B_empty__modify_short.accdb
- 031__sub_B_empty__rename.accdb
- 032__sub_AB_empty__add.accdb
- 032__sub_AB_empty__delete.accdb
- 032__sub_AB_empty__modify_long.accdb
- 032__sub_AB_empty__modify_short.accdb
- 032__sub_AB_empty__rename.accdb
- 033__sub_LongName_empty__add.accdb
- 033__sub_LongName_empty__delete.accdb
- 033__sub_LongName_empty__modify_long.accdb
- 033__sub_LongName_empty__modify_short.accdb
- 033__sub_LongName_empty__rename.accdb
- 040__sub_msgbox_hello__add.accdb
- 040__sub_msgbox_hello__delete.accdb
- 040__sub_msgbox_hello__modify_long.accdb
- 040__sub_msgbox_hello__modify_short.accdb
- 040__sub_msgbox_hello__rename.accdb
- 041__sub_msgbox_world__add.accdb
- 041__sub_msgbox_world__delete.accdb
- 041__sub_msgbox_world__modify_long.accdb
- 041__sub_msgbox_world__modify_short.accdb
- 041__sub_msgbox_world__rename.accdb
- 042__sub_msgbox_long__add.accdb
- 042__sub_msgbox_long__delete.accdb
- 042__sub_msgbox_long__modify_long.accdb
- 042__sub_msgbox_long__modify_short.accdb
- 042__sub_msgbox_long__rename.accdb
- 043__sub_msgbox_two__add.accdb
- 043__sub_msgbox_two__delete.accdb
- 043__sub_msgbox_two__modify_long.accdb
- 043__sub_msgbox_two__modify_short.accdb
- 043__sub_msgbox_two__rename.accdb
- 044__sub_dim_int__add.accdb
- 044__sub_dim_int__delete.accdb
- 044__sub_dim_int__modify_long.accdb
- 044__sub_dim_int__modify_short.accdb
- 044__sub_dim_int__rename.accdb
- 045__sub_dim_long__add.accdb
- 045__sub_dim_long__delete.accdb
- 045__sub_dim_long__modify_long.accdb
- 045__sub_dim_long__modify_short.accdb
- 045__sub_dim_long__rename.accdb
- 046__sub_dim_string__add.accdb
- 046__sub_dim_string__delete.accdb
- 046__sub_dim_string__modify_long.accdb
- 046__sub_dim_string__modify_short.accdb
- 046__sub_dim_string__rename.accdb
- 047__sub_let_int__add.accdb
- 047__sub_let_int__delete.accdb
- 047__sub_let_int__modify_long.accdb
- 047__sub_let_int__modify_short.accdb
- 047__sub_let_int__rename.accdb
- 048__sub_let_int_42__add.accdb
- 048__sub_let_int_42__delete.accdb
- 048__sub_let_int_42__modify_long.accdb
- 048__sub_let_int_42__modify_short.accdb
- 048__sub_let_int_42__rename.accdb
- 049__sub_comment_only__add.accdb
- 049__sub_comment_only__delete.accdb
- 049__sub_comment_only__modify_long.accdb
- 049__sub_comment_only__modify_short.accdb
- 049__sub_comment_only__rename.accdb
- 050__sub_if_true__add.accdb
- 050__sub_if_true__delete.accdb
- 050__sub_if_true__modify_long.accdb
- 050__sub_if_true__modify_short.accdb
- 050__sub_if_true__rename.accdb
- 051__sub_for_1_to_3__add.accdb
- 051__sub_for_1_to_3__delete.accdb
- 051__sub_for_1_to_3__modify_long.accdb
- 051__sub_for_1_to_3__modify_short.accdb
- 051__sub_for_1_to_3__rename.accdb
- probe_add.accdb
- probe_delete.accdb
- probe_delete2.accdb
- probe_delete3.accdb
- probe_modify.accdb
- probe_rename.accdb
- probe_resize.accdb
- probe_resize_roundtrip.accdb
- test_access.py
- test_cfb.py
- test_cli.py
- test_determinism.py
- test_excel.py
- test_gates.py
- test_language_matrix.py
- test_live_excel_gate.py
- test_powerpoint.py
- test_pull_push.py
- test_vba.py
- test_version.py
- test_word.py
- run_macro.ps1
- run_macro_worker.ps1
- watch_vbe_dialogs.ps1
- .gitattributes
- .gitignore
- LICENSE.md
- pyproject.toml
- README.md
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
dir
View Details ▼
dir
List files.
dir
List files in the current working directory:
tldr ls
View documentation for the original command:
dir
Show the contents of the current directory:
git clone
View Details ▼
git clone
Clone an existing repository.
git clone {{remote_repository_location}} {{path/to/directory}}
Clone an existing repository into a new directory (the default directory is the repository name):
git clone --recursive {{remote_repository_location}}
Clone an existing repository and its submodules:
git clone {{[-n|--no-checkout]}} {{remote_repository_location}}
Clone only the `.git` directory of an existing repository:
pip install
View Details ▼
pip install
Install Python packages.
pip install {{package1 package2 ...}}
Install one or more packages:
pip install {{package1 package2 ...}} {{[-U|--upgrade]}}
Upgrade all specified packages to the latest version, installing any that are not already present:
pip install {{package}}=={{version}}
Install a specific version of a package:
pytest
View Details ▼
pytest
Run Python tests.
pytest {{path/to/test_file1.py path/to/test_file2.py ...}}
Run tests from specific files:
pytest -k {{expression}}
Run tests with names matching a specific [k]eyword expression:
pytest {{[-x|--exitfirst]}}
Exit as soon as a test fails or encounters an error:
python
View Details ▼
python
Python language interpreter.
python
Start a REPL (interactive shell):
python {{path/to/file.py}}
Execute a specific Python file:
python -i {{path/to/file.py}}
Execute a specific Python file and start a REPL:
