how to convert to pdf by VBA code?

#1
Hi everyone,
I have a group of dwg files need to be converted to pdf (just print paperspace part is ok, using the "Dwg to pdf.pc3" printer), so I need to figure out how to convert a file to pdf by using VBA code. I want to convert different files to different paths, and don't want any message boxes to be shown, so I don't have to check one by one.
I know the solution might in the PlotManager object and PlotToFile method, but It's hard to find some ICad code examples, can anyone provide me the code example about printing? any help will be very appreciated!
Thanks