When I tried to combine/copy two workbooks, I noticed a weird issue causing macro missing.
var workbook1 = new Workbook(@".\test1.xlsm");
var workbook2 = new Workbook(@".\test2.xlsx");
workbook1 had a macro but in the output, it is missing.
What is weird is that if I tried to access the VbaProject property (for example by uncommenting the line in my code sample) before copying, then the output will have the macro properly.
Reading/accessing a member shouldn’t affect the output.
I’ve attached my test files for your reference. Could you please help us take a look?
missingmacro.zip (28.7 KB)