Making a macro

I want to make a macro that when a file goes to the "Released" state a pdf will be made and put into the same subdirectory. It would also be checked in under the proper users name.

SolidworksApi macros