Solved

HTML Document Print - How to remove header/footer?

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA Shell can't Find Word document 11 108
Protecting vb6 & .Net code Obfuscation 18 150
Automatic Email Reminder 4 56
Publisher:   Unknown     VB.exe Application 1 27
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 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