Printing from Webbrowser- suppressing report titling 
Author Message
 Printing from Webbrowser- suppressing report titling

Question from Newbie to Webbrowser.....

I have the code to print a report from the Webbrowser (I.e.
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, "", ""), but I
am finding that the reports always include the following four items in the
headers and trailers:

1) Report Title,
2) "Page 1 of ..."
3) URL of file
4) Date printed.

Is there anyway to suppress this information when the report is printed?

This is made worse by my current code which performs a navigation to
"about:blank", following by an OPEN, WRITE of the HTML and CLOSE of the
Webbrowser document. When the reports are printed, they always show with a
URL of "about:blank" !

Any help in this matter would be gratefully received....

Thanks
--
Nick Perkins
(remove all x's for correct email address)



Sun, 28 Jul 2002 03:00:00 GMT  
 Printing from Webbrowser- suppressing report titling
Nick-
    Take a peek at this key in the registry.
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup

Under it, is a header and footer string, this is what gets printed at the
top of each page and the bottom. Simple use some API calls to read the
strings, save them in your program before printing, clear the strings in the
registry so it removes the footer and header variables. After being printed,
put those variables back into the registry, so the users settings will be
back to normal. If you would like to print custom information, based on your
program, fill up those strings with text or any of those variables. For the
meanings of the variables for the header and footer, look in your IE help
file. If you have anymore questions, feel free to ask!

Good Luck!
-Rick

--
Rick Harjes
Visual Basic e-Certified Professional


| Question from Newbie to Webbrowser.....
|
| I have the code to print a report from the Webbrowser (I.e.
| WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, "", ""), but
I
| am finding that the reports always include the following four items in the
| headers and trailers:
|
| 1) Report Title,
| 2) "Page 1 of ..."
| 3) URL of file
| 4) Date printed.
|
| Is there anyway to suppress this information when the report is printed?
|
| This is made worse by my current code which performs a navigation to
| "about:blank", following by an OPEN, WRITE of the HTML and CLOSE of the
| Webbrowser document. When the reports are printed, they always show with a
| URL of "about:blank" !
|
| Any help in this matter would be gratefully received....
|
| Thanks
| --
| Nick Perkins
| (remove all x's for correct email address)
|
|



Sun, 28 Jul 2002 03:00:00 GMT  
 Printing from Webbrowser- suppressing report titling
Rick,

Many thanks for the information. I suspect I would never have found this!
Could be 'fun' trying it out, though :-)

--
Nick
(remove all x's for correct email address)

Quote:

>Nick-
>    Take a peek at this key in the registry.
>HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup

>Under it, is a header and footer string, this is what gets printed at the
>top of each page and the bottom. Simple use some API calls to read the
>strings, save them in your program before printing, clear the strings in
the
>registry so it removes the footer and header variables. After being
printed,
>put those variables back into the registry, so the users settings will be
>back to normal. If you would like to print custom information, based on
your
>program, fill up those strings with text or any of those variables. For the
>meanings of the variables for the header and footer, look in your IE help
>file. If you have anymore questions, feel free to ask!

>Good Luck!
>-Rick

>--
>Rick Harjes
>Visual Basic e-Certified Professional




<snip>


Mon, 29 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to customize or suppress header and footer when printing from WebBrowser control

2. How to customize/suppress header and footer when printing from WebBrowser control

3. How to customize or suppress header and footer when printing from WebBrowser control

4. How to customize/suppress header and footer when printing from WebBrowser control

5. Suppress report save dialog after print setup?

6. WebBrowser: Suppressing javascript error dialogue box?

7. Suppress dialog box popup in WebBrowser control?

8. Suppress or Trap Error Boxes in WebBrowser Control

9. GURU needed: VB6 webbrowser: Detect Navigation to local File system -- suppress new window

10. ACC 97 subreport title prints on report

11. Report Title Prints In Italics

12. Title of html doc in a webbrowser object URGENT please

 

 
Powered by phpBB® Forum Software