| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Footers
Probably the wrong place to put this but hey...
Wondering if there is anyway to stop the footers printing in IE? I know I can do it via print options but that's not suitable; this is for other people printing who won't know how to do that and can't be bothered (i.e. users )Any ideas? Fairly sure it can't be done with CSS but happy to be proved wrong. Cheers, Dean |
|
#2
|
||||
|
||||
|
Footers?
__________________
Practice safe design all ways use a concept. If I have been helpful please click the scales. |
|
#3
|
||||
|
||||
|
The bit that prints at the bottom of a webpage.
Normally a location string or similar. |
|
#4
|
||||
|
||||
|
i believe that can only be shut off by the printer settings.
__________________
Come JOIN the party!!! Quote of the Month: Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#5
|
||||
|
||||
|
ah yeh sorry mate, no idea on that one.
|
|
#6
|
||||
|
||||
|
Ah well; was just incase anybody knew any little "quirks" that could do it.
Had an idea that would be the only way. Cheers all, Dean |
|
#7
|
||||
|
||||
|
okay ... so i found something that may work ... it's vbscript ...
Code:
Dim WSHShell
Dim myHeader
Dim myFooter
Set WSHShell = CreateObject("WScript.Shell")
//After declaring the variables,
//the code first captures the current settings of browsers header and footer:
myHeader = WSHShell.RegRead("HKCU\Software\Microsoft\Internet Explorer\PageSetup\header")
myFooter = WSHShell.RegRead("HKCU\Software\Microsoft\Internet Explorer\PageSetup\footer")
//It then proceeds to delete the current settings:
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\PageSetup\header", ""
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\PageSetup\footer", ""
//Code to print the page with no user intervention
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.Toolbar = False
objIEA.Visible = True
objIEA.Navigate "http://www.google.com"
While objIEA.Busy
Wend
objIEA.ExecWB 6,2
Set objIEA = Nothing
//Resets the header and footer back to what the user had to begin with
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\PageSetup\header", myHeader
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\PageSetup\footer", myFooter
I found this on the net ... just don't remember where ... it was located in the back of my code snippet database and I forgot all about it. You may want to try playing with this and see if it will work (only works in IE, need ActiveX set to at least prompt, will remove Printer headers and footers and reset them back.) |
|
#8
|
||||
|
||||
|
I'll try that in work tomorrow.
Cheers! Dean ![]() |
|
#9
|
||||
|
||||
|
cool ... glad it worked for you ...
|
|
#10
|
||||
|
||||
|
Quote:
What OS were you using on your server to do this? I tried to use this today using Windows 2003 server and it didn't work. It gave me an error that it couldn't find the registry key Code:
HKCU\Software\Microsoft\Internet Explorer\PageSetup\header Thanks in advance
__________________
................... ASCII and ye shall receive .................. Knowledge is the only resource on earth that multiplies when shared Support the Shemzilla Project Powered by C# |
|
#11
|
||||
|
||||
|
Windows 2000/NT; haven't tried it on an NT machine yet though.
|
|
#12
|
||||
|
||||
|
Quote:
I tried it as a test on our company's intranet ... that is running on a 2003 Server. |
|
#13
|
||||
|