Is this just a typo?
Given your definiton of the macro it should be
Additional to that, you expect a ReturningObject as an parameter, while currentDocument is definitly not a ReturningObject. The Parameter should more look like something like this:
[MacroMethodParam(0, "CurrentPage", typeof(TreeNode), "The current rendered page")]