Solved

HTML Document Print - How to remove header/footer?

Posted on 2002-03-13
4
462 Views
Last Modified: 2007-12-19
Hi,

Okay, I solved the printing issue on HTMLDocument..

DIM rep as HTMLDocument
rep = h.createDocumentFromURL "xyz.html", ""
rep.execCommand "Print"

Fine, the printer setup dialog appears and off it goes. However, extra header/footers are added:

                         Page 1 of 3
....my stuff....

full/path/to/xyz.html          Date

Any ideas on how to prevent this from happening? I am want JUST ...my stuff.. to appear, which is a plain HTML document wrapped in <HTML>...</HTML> tags.

Many thankx in advance,
Mark
0
Comment
Question by:mh2
  • 3
4 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6860881
I think, you need to read values from registry, change them and restore them on exit.
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 total points
ID: 6860899
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup]
"header"="&w&bPágina &p de &P"
"footer"="&u&b&d"
0
 
LVL 3

Author Comment

by:mh2
ID: 6863793
Yes!! Success!!

Thank you very much, that worked perfectly. I now get exactly what I want.

I will most likely be posting further questions about manipulating the HTML documents, so keep an eye out for them and you might get alot of points off of me! :)

Thankx agian,
Mark
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6864598
:)))
I will keep my eyes opened!
Thanks for "A" grade.
You could take a look at:
www.angelfire.com/realm/vb-shared/index.html
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now