Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE Page Setup Component help!!!

Status
Not open for further replies.

slyndon

Programmer
Jun 12, 2003
3
GB
Hi

My scenario is this. I have a 'printer friendly' ASP page where content is dynamically created. At the moment when I print the page it shows a header and footer. I don't want this. I know you can delete the contents of the header/footer by going to File > Page Setup, but I want it to do this automatically so my user isn't bothered with it.

I asked this question on another forum and go this answer:

******************************
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup
"header"="&w&bPage &p of &P"
"footer"="&u&b&d"

Is where those values are stored. Javascript does not let you access the registry for security reasons.

The only way you can do this is to write an active X component for your web page access those values change it before you print the page then change it back to the original value after printing.
******************************

Now, can someone please help me with setting this up. I have naff all experience with ActiveX and registry editing and so don't have a clue where to start. I need to be able to call this action from my existing ASP page - not sure how it works. Just to confirm I need to change the header and footer to:

"header"=""
"footer"=""

It is not important to change the values back again, but I suppose this would be good practice.

Anyone help me?

Thanks
Scott
 
now sorted - just used asp to open the doc in MS Word
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top