Dancing Square

   :: 首页 ::  ::  :: 管理


<HTML>
<HEAD>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb_2312-80">
<link rel="stylesheet" type="text/css" href="edit.css">
<title>保存为Word文档</title>
</HEAD>
<script language="javascript">
window.returnValue=0
</script>
<BODY>
<font color="#000080"><strong><div id="strHint" align="center">数据处理中,请等待...<br>
Data processing, please wait...</div></strong></font><font color="#0080C0">

<script language="vbscript">
On Error Resume Next

Dim wApp

Set wApp = CreateObject("Word.Application")
If Err.number > 0 Then
else
wApp.visible = True

wApp.Documents.open("e:\test.doc")      '此处改为文档的物理路径

With wApp.Application

.WindowState = wdWindowStateNormal

.DisplayStatusBar=False

.CommandBars ("Standard").Visible = False

.CommandBars ("Formatting").Visible = False

.CommandBars("File").Enabled = False

.CommandBars("Edit").Enabled = False

.CommandBars("View").Enabled = False

.CommandBars("Insert").Enabled = False

.CommandBars("Format").Enabled = False

.CommandBars("Tools").Enabled = False

.CommandBars("Table").Enabled = False

.CommandBars("Window").Enabled = False

.CommandBars("Help").Enabled = False

End With

With wApp.Application.Options

.AllowDragAndDrop = False

.ConfirmConversions = False

End With

end if
</script>
<script language="javascript">
window.close();
</script><center><br><strong>数据处理完毕!</strong></center><p>
</p><div align='center'><center><input type=button class=buttonface name='cmdOK' onclick="window.returnValue=0;window.close();" value=" 确 定 " ></center></div>

</BODY>
</HTML>

posted on 2005-06-22 14:24 Dancer 阅读(562) 评论(1)  编辑 收藏 引用 所属分类: 软件技术

Feedback

# re: 屏蔽word打印保存 2009-04-10 10:13
代码能通过么?我装的word07版,测试不通过  回复  更多评论
  

只有注册用户登录后才能发表评论。