Macro to save a Drawing as pdf in a particular folder

Hello,

i would like to save a drawing as pdf in a folder where the path for the Folder is linked to the name of the file.

For example. the Filename is E853028569 then it should be pasted in C:\\dhf-pdf\\853\\02\\Filename.pdf

Can someone tell me how i could write a code for such a logic or provide me a code.

Thanks in advance.

SolidworksApi macros