Sheet format dimensions as model size

Hey guys, 

I am wondering how to make a macro which would update my sheet format size to be the same as my model. I have about 1000 configurations and I have to make in 1:1 scale drawing on a machine. 

The most important thing is to save it as .pdf in CMYK colour space, so I actually made a macro to save each configuration as pdf with appropriate name but I can't get rid of it how to update sheet format for each of them.

Thanks for help

SolidworksApi/macros