How do you get the name of a sketch?

I need to write a macro that will get the name of the current sketch and append it to some text which will then be used as a value for a custom property. I've seen one posting on this and tried it but it doesn't work. Can anyone help?

Thanks

SolidworksApi macros