Hi Paolo,
The [ExcelFunction(...)] attribute, and that IsMacroType=true flag,
are only used for worksheet UDF functions.
By default, worksheet functions would not be able to read the
xlfGetDocument information. But macros can be registered as "macro
sheet functions", which enables such access from the UDF.
In the case of your example, you are registering a macro (returns
'void') and so you'd use the [ExcelCommand] attribute instead.
All macros have access to the information functions, so no need for an
"IsMacroType=true" in this case.
In fact (unless you have set ExplicitExports='true' in your .dna file)
your code should work fine if you just remove the [ExcelCommand]
attribute. (With the ExplicitExports='true' you'd have to use an
[ExcelCommand] attribute to mark the method for registration.)
Regards,
Govert