22-11-23 09:15 AM
Hi folks,
In one of our processes we get an XL file via email. The XL file contains a macro that has to be enabled by the sender. If not enabled, the data will be incomplete and the XL will be rejected.
I'm trying to establish in an early stage if the macro is indeed enabled or not. The XL VBO does not provide a suitable action to check this, so I'm thinking to make a utility action that checks for this.
Being not much of a C# or VBA programmer, I wonder if anyone can point me in the direction of what code would return a 'Excel Macro enabled' flag?
------------------------------
Happy coding!
Paul
Sweden
29-11-23 06:50 AM
Ok, I will conclude that this is not possible to determine in C# or VBA. Which sounds strange to me, but I haven't been able to come up with anything useful after a few hours of googling either.
----------------
Happy coding!
Paul
Sweden
30-11-23 07:00 PM
01-12-23 11:20 AM
Hi Abhisekh,
Thanks for the code. Tried to put it in a code stage but then the object complains about this:
Page: Initialise
Description: Compiler error at top section line -6: Metadata file 'Microsoft.Office.Interop.Excel.dll' could not be found
The Check Code button on the code stage shows no errors and the object is set to C#. I probably need to add some settings for Code Options in the Initialize page. I got these setting already:
Any idea?
----------------
Happy coding!
Paul
Sweden