Macro not working in 2017

Hi,

Could someone point me in the right direction on this issue.

I have been using a macro in previous releases that places Ref Numbers (Flags) for each dimension and exports dimension size out to excel.

Now I have upgraded to 2017 and run the macro rather than see a Ref number (Flag) next to each dimension I see what's shown as below.

I have attached the macro so what do I need to edit to allow this macro to run as before.

I am using SolidWorks 2017 and Excel 2007.

Thanks

Mark

SolidworksApi macros