以下是IE打印設(shè)置腳本 <script language="VBScript"> Dim hkey_root,hkey_path,hkey_key hkey_root = "HKEY_CURRENT_USER" hkey_path = "\Software\Microsoft\Internet Explorer\PageSetup" //IE打印設(shè)置的注冊表地址 //設(shè)置修改函數(shù) 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" //鍵值設(shè)定--左邊邊界 hkey_key="\margin_top" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"1" //鍵值設(shè)定--上邊邊界 hkey_key="\margin_right" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"1" //鍵值設(shè)定--右邊邊界 hkey_key="\margin_bottom" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"1" //鍵值設(shè)定--下邊邊界 end function //恢復(fù)默認(rèn)設(shè)置 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" //頁數(shù)- hkey_key="\footer" RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&u&b&d" //網(wǎng)址,日期等信息 end function </script> 除了以上鍵值以外還有以下幾項(xiàng),其值有待確認(rèn)。 duplex orientation paper_size paper_source printer 注意:上面對頁邊距的設(shè)置為:1,實(shí)際設(shè)置值為25.4。
|