<script language="vbscript">
dim hkey_root,hkey_path,hkey_key
hkey_root = "hkey_current_user"
hkey_path = "\software\microsoft\internet explorer\pagesetup" //ie打印设置的注册表地址
//设置修改函数
function pagesetup_null()
on error resume next
set regwsh = createobject("wscript.shell")
hkey_key="\header"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"" //页眉
hkey_key="\footer"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"" //页脚
hkey_key="\margin_left"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"1" //键值设定--左边边界
hkey_key="\margin_top"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"1" //键值设定--上边边界
hkey_key="\margin_right"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"1" //键值设定--右边边界
hkey_key="\margin_bottom"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"1" //键值设定--下边边界
end function
//恢复默认设置
function pagesetup_default()
on error resume next
set regwsh = createobject("wscript.shell")
hkey_key="\header"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"&w&b页,&p/&p" //页数-
hkey_key="\footer"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"&u&b&d" //网址,日期等信息
end function
</script>
除了以上键值以外还有以下几项,其值有待确认。
duplex
orientation
paper_size
paper_source
printer
注意:上面对页边距的设置为:1,实际设置值为25.4。
文章整理:站长天空 网址:http://www.z6688.com/
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




