0

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);

Page Setup Dialog

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.

Kyle Williamson
  • 2,251
  • 6
  • 43
  • 75

1 Answers1

0

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".

Internet Explorer Page Setup registry keys

Kyle Williamson
  • 2,251
  • 6
  • 43
  • 75