WPS Office2007下载
首页 >> 技术文章 >> InfoPath2007


通过使用脚本自定义InfoPath 2007表单模板

添加当用户提交表单数据时运行的脚本

  1. “工具”菜单上,单击“提交选项”
  2. “提交选项”对话框中,选中“允许用户提交此表单”复选框。
  3. 单击“使用代码执行自定义操作”,然后单击“编辑代码”。Microsoft 脚本编辑器将启动,且光标位于 OnSubmitRequest 事件处理程序上。
  4. JScript

    //=======
    // The following function handler is created by Microsoft Office InfoPath.
    // Do not modify the name of the function, or the name and number of arguments.
    //=======
    function XDocument::OnSubmitRequest(eventObj)
    {
    // If the submit operation is successful, set
    // eventObj.ReturnStatus = true;
    // Write your code here
    }

    VBScript

    '=======
    ' The following function handler is created by Microsoft Office InfoPath.
    ' Do not modify the name of the function, or the name and number of arguments.
    '=======
    Sub XDocument_OnSubmitRequest(eventObj)
    ' If the submit operation is successful, set
    ' eventObj.ReturnStatus = True
    ' Write your code here
    End Sub
  5. 用您的代码替换注释 If the submit operation is successful, set eventObj.ReturnStatus = true Write your code here。
  6. 要测试所做更改,请单击“常用”工具栏上的“预览”或按 Ctrl+Shift+B。


声明:欢迎各大网站转载本站文章,还请保留一条能直接指向本站的超级链接,谢谢!

第1页 | 第2页 | 第3页 | 第4页 | 第5页 | 第6页 | 第7页 | 第8页

时间:2007-7-19 21:16:20,点击:0打印】【关闭

上一篇:调试InfoPath 2007脚本
下一篇:创建事件处理程序

OfficeBa论坛】:阅读本文时遇到了什么问题,可以到论坛进行交流!Excel专家邮件:342327115@qq.com(大家在Excel使用中遇到什么问题,可以咨询此邮箱)。

【声明】:以上文章或资料除注明为Office吧自创或编辑整理外,均为各方收集或网友推荐所得。其中摘录的内容以共享、研究为目的,不存在任何商业考虑。如有任何异议,请与本站联系,联系邮箱:thinkou@126.com,本站确认后将立即撤下。谢谢您的支持与理解!


相关评论

我要评论

查看所有评论内容

评论内容