以下是IE打印設置腳本
 <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。
新聞熱點
疑難解答