Solved

HTML Document Print - How to remove header/footer?

Posted on 2002-03-13
4
465 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

912 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

24 Experts available now in Live!

Get 1:1 Help Now