If you have Word installed on the user machines (assuming this is a locally run program), one could consider automating Word to open the file, change margins and then print.
B -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Roger Upole Sent: Thursday, March 30, 2006 1:55 AM To: python-win32@python.org Subject: [python-win32] Re: Question about printing through IE Jason Robinson wrote: > Hi, > > Being relatively new to Python (and no advanced programmer anyhow) I have a > question.. > > For a work related program I need my Python script to be able to change > printer settings in IE before printing. I have a script which creates an > HTML file with images and text and it uses the ShellExecute approach to > print it to a printer (using IE obviously). Only problem is I need it to > access the IE printing settings directly and modify them before printing > (margins etc etc). I've searched the web throughout but can't figure out > where to start... > > Any hints on what I should do? > > Cheers for any help! IE stores printing parameters in the registry at HKCU\Software\Microsoft\Internet Explorer\PageSetup. For options not covered there, you can use functions in the win32print module to change your default printer settings, but they'll apply to anything you print, not just IE. hth Roger _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32