Skip to content
 
 

Latest commit

 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VBA Sync Tool VBA Syc Tool logo

Microsoft Office VBA code is usually held in binary format, making proper version control difficult. VBA Sync Tool synchronizes macros between a VBA-enabled file and a folder, enabling easy version control using any VCS.

Features

VBA Sync Tool works *directly with the Office file,* unlike most other solutions, which use a host application (e.g., Excel) to manipulate the VBA code. This gives it several advantages: * Does not require special Excel settings. * Does not add to your VBA code base. * Allows you to use any off-the-shelf version control system. * Allows you to cherry-pick which modules to extract or publish. * Minimizes spurious changes by ignoring case on variable names, making merges easier. * Extracts full code including several hidden attributes. * Also extracts settings not tied to a particular module, like references. * Generates FRX files compatible with the VBE, but *without* any embedded timestamp. * Allows you to extract or publish a FRM module without necessarily updating its FRX module. * Works with document or worksheet modules in the same way as any other module. * Supports Excel 97-2003, Excel 2007+, Word 97-2003, Word 2007+, PowerPoint 2007+, and Outlook files.

Using

VBA Sync Tool has two modes: **Extract** mode extracts modules from the file into the folder. You can then commit the extracted files to version control. **Publish** mode publishes modules from the folder into the file. You should do this after merges.

After you select a mode, a folder path, and a file path, the tool will list which modules have changed, with a checkbox next to each. Tick the checkbox next to each module with changes you'd like to apply. Double-click an entry to run a diff tool against the old and new files. (This requires setting up a diff tool under FileSettings.) If the underlying files change, click Refresh. When you're ready to synchronize, click Apply or OK.

You can save and load session settings from the File menu. Settings are saved as .ini files. If a settings file is named VBASync.ini and located in the working directory, VBA Sync Tool will load those settings automatically. You can also specify a settings file on the command-line. I recommend launching VBA Sync Tool from a shortcut, to avoid having to specify the folder and file each time you need to synchronize.

VBA Sync Tool after selecting folder and file locations

Contributing

I appreciate any code contributions, but am especially interested in translations and [issue #1](chelh#1) (Access database support).

To build the tool, you will need to download VBACompressionCodec.dll, and drop it in the solution’s root directory.

License

Copyright © 2017 Chelsea Hughes

You may use this software for any purpose and alter it freely. You may redistribute it subject to these restrictions:

  1. Don’t misrepresent the software’s origin.
  2. Clearly mark any altered versions, and don’t misrepresent them as the original.
  3. Keep this notice intact when you distribute the software’s source code.

This software is provided “as-is,” without any express or implied warranty. In no event will I be held liable for any damages arising from the use of this software.

About

Synchronizes macros from an Office VBA-enabled file with a version-controlled folder

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages