Reputation: 2184
In my Delphi application, I can use the following code to show the Page Setup dialog to my users before printing.
//WebHTML is a TWebBrowser with a Document loaded.
WebHTML.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER);
Is it possible to change these page setup options using code (without showing the Page Setup dialog to my users)? I specifically want to control the Header and Footer options so that all users will have the same headers and footers.
Upvotes: 0
Views: 156
Reputation: 2184
The page setup settings are saved and loaded using Windows Registry keys. I wrote code to change the keys at the location "Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup".
Upvotes: 0