Converting from Microsoft Office Publisher to Postscript

def publisher(pubfile, psfile, printer):
     pythoncom.CoInitializeEx(pythoncom.COINIT_APARTMENTTHREADED)
     myPulisher = win32com.client.DispatchEx('Publisher.Application')
     myDoc = myPublisher.Open(pubfile,True,False,3);
     myDoc.ActivePrinter = printer
     myDoc.PrintOut(1,myDoc.Pages.Count,psfile,1,False)
     myDoc.Close()
     myPublisher.Quit()
     del myDoc
     del myPublisher
     pythoncom.CoUninitialize()

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.