Skip to content

Releases: NetOfficeFw/vbamc

vbamc v2.0.1

16 Jan 12:47
v2.0.1
a0ce8d5

Choose a tag to compare

v2.0.1

VbaCompiler v2.0.1 is a hotfix release which ensures Microsoft Office macro files
are generated correctly.

Fixes

  • Ensures the generated macro project files are valid.
  • Reverted OpenMcdf library update to maintain compatibility (kept at v2.4.1).

Installation

Install as a .NET tool:

dotnet tool install --global vbamc --version 2.0.1

Upgrade from previous version:

dotnet tool update --global vbamc

Add VbaCompiler library to your project:

dotnet add package NetOfficeFw.VbaCompiler --version 2.0.1

v2.0.0

22 Nov 16:39

Choose a tag to compare

VbaCompiler v2.0.0 is a major release that brings support for .NET 10, modernizes dependencies, and improves performance.

What's New

  • The VbaCompiler library and vbamc tool work on .NET 8 and 10 runtimes.
  • Works on Linux, macOS, and Windows.

Installation

Install as a .NET tool:

dotnet tool install --global vbamc --version 2.0.0

Upgrade from previous version:

dotnet tool update --global vbamc

Add VbaCompiler library to your project:

dotnet add package NetOfficeFw.VbaCompiler --version 2.0.0

Usage

Use vbamc tool to generate a PowerPoint macro-enabled presentation:

vbamc --module Module.vb --class MyClass.vb --name "VBA Project" --company "ACME" --file Presentation.ppam

Using VbaCompiler library

using DocumentFormat.OpenXml.Packaging;
using vbamc;

var compiler = new VbaCompiler();
compiler.ProjectId = Guid.NewGuid();
compiler.ProjectName = "My Macro Project";
compiler.CompanyName = "ACME";
compiler.AddModule("Module.vb");
compiler.AddClass("MyClass.vb");

// Generate the vbaProject.bin file
var vbaProjectPath = compiler.CompileVbaProject("obj", "vbaProject.bin");

// Generate Excel macro file
var macroFilePath = compiler.CompileExcelMacroFile(
    "bin", 
    "MyMacro.xlsm", 
    vbaProjectPath, 
    SpreadsheetDocumentType.MacroEnabledWorkbook
);

Dependency Updates

  • OpenMcdf 3.1.0: Updated to the latest version of OpenMcdf library for improved CFB (Compound File Binary) file format handling.
  • DocumentFormat.OpenXml 3.3.0: Latest version provides better Office Open XML document processing.
  • NetOfficeFw.VbaCompression 3.0.1: Updated compression library for VBA project files.
  • Microsoft.SourceLink.GitHub 8.0.0: Enhanced debugging experience with up-to-date source linking.

Infrastructure Enhancements

  • Modernized CI/CD: Updated release workflow with Trusted Publishing for more secure package distribution.
  • Artifact attestation: Enhanced security with artifact attestation in the release process.
  • Automated dependency updates: Configured Dependabot for GitHub Actions to keep CI/CD dependencies current.

Breaking Changes

This major release removes support for .NET 6 and .NET 7. The project now targets only .NET 8 and .NET 10.

Acknowledgments

Thank you to all contributors who helped make this release possible!

v1.8.0

19 Dec 13:06

Choose a tag to compare

The vbamc tool will work on .NET 6, 7 and 8 runtimes.

v1.7.0

10 Nov 22:28

Choose a tag to compare

This release add new vbamc tool argument to set extended properties in the compiled documents.

Usage

Call vbamc with the argument --property with key value pair PropertyName=Value:

vbamc -m Module.vba -c Class.vba --property Generator=VbaCompiler

This will create extended property named Generator with value VbaCompiler in the compiled Office document.

v1.6.0

26 Sep 12:13

Choose a tag to compare

This release changes the VbaCompiler to compile the vbaProject.bin and the macro file to output streams instead of files.

Features

  • The VbaCompiler.CompileVbaProject(Stream) will save the vbaProject.bin content to the stream
  • The vbaCompiler.Compile*MacroFile() methods will accept streams

Breaking change

  • VbaCompiler no longer supports compiling files directly to file path

vbamc tool

  • The vbamc tool will generate macro file in correct format based on the file extension

v1.5.1

25 Sep 12:48

Choose a tag to compare

Updates library dependencies to latest versions.

Runtime dependencies for VbaCompiler library:

  • DocumentFormat.OpenXml v2.20.0
  • OpenMcdf v2.3.0

Runtime dependencies for vbamc tool:

  • McMaster.Extensions.CommandLineUtils v4.1.0

v1.5.0

25 Sep 12:44

Choose a tag to compare

This is a release add new API to VbaCompiler to add extended properties to the macro file.

New features

  • Add extended properties to the macro file using VbaCompiler.ExtendedProperties property

Note
Extended properties are not exposed to the command line vbamc tool.

v1.4.3

06 Jul 16:17

Choose a tag to compare

This is a release with small quality of life changes from @m-kovac.

You can now the the Version property of the add-in file and vbamc compiler and the library can be used in multithreaded scenarios as it won't use write-locks when reading image files for the Ribbon.

New features

  • You can set the package version value by the ProjectVersion argument #7

Improvements

  • vbamc will not lock image files for writing when generating the addin file #9
  • vbamc compiler will not produce the dir.bin files which was used to debug the compiler during development #8

v1.4.2

16 May 11:10

Choose a tag to compare

This release does not have any changes in command line vbamc tool.

Added

  • To support compilation of custom addins, the VbaCompiler library allows the developer to set base directory to Ribbon customization files (the customUI folder). #6
  • The VbaCompiler library was updated to allows compiling PowerPoint add-in files on Windows platform and replacing the user profile path ~/ with the macOS directory separator. #5

Release notes for v1.4.0

Change the user profile path which will replace the ~/ expression in source code using the --user-profile-path parameter.

Warning Reverted change to the --file parameter from v1.3.0 release.

Parameter --file requires filename with extension now. This behavior is the same as for v1.2.0 release.


The vbamc compiler is now listed on NuGet https://www.nuget.org/packages/vbamc

Install it using command

dotnet tool install --global vbamc --version 1.4.1

vbamc v1.4.1

10 May 10:39

Choose a tag to compare

This release does not have any changes in command line vbamc tool.

Added

  • The VbaCompiler library was updated to allows compiling PowerPoint add-in files on Windows platform and replacing the user profile path ~/ with the macOS directory separator. #5

Release notes for v1.4.0

Change the user profile path which will replace the ~/ expression in source code using the --user-profile-path parameter.

Warning Reverted change to the --file parameter from v1.3.0 release.

Parameter --file requires filename with extension now. This behavior is the same as for v1.2.0 release.


The vbamc compiler is now listed on NuGet https://www.nuget.org/packages/vbamc

Install it using command

dotnet tool install --global vbamc --version 1.4.1