Dim p As new Process()
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.UseShellExecute = False '关闭Shell的使用
p.StartInfo.RedirectStandardInput = True '重定向标准输入
p.StartInfo.RedirectStandardOutput = True '重定向标准输出
p.StartInfo.RedirectStandardError = True '重定向错误输出
p.StartInfo.CreateNoWindow = True '设置不显示窗口
p.Start()
p.StandardInput.WriteLine( "net use * /del /y")
p.StandardInput.WriteLine( "net use \\win-p589p7dh28g 密码 /user:123aa")
p.StandardInput.WriteLine("exit")
Dim r As Row = Tables("理化检测_table3").Current
Dim tmfx As String = ProjectPath & "Attachments\分析报告模板.doc" '指定模板文件
Dim f As String = projectpath & "\\win-p589p7dh28g\reports\" & e.form.controls("TextBox9").Text & ".doc" '指定目标文件
Dim wrtfx As New WordReport(Tables("理化检测_table3"),tmfx,f) '定义一个WordReport
wrtfx.ReplaceWithImage("[图片]",r("报告人") & ".png",65,50)
wrtfx.Build() '逐行生成报表
wrtfx.quit() '退出报表
老师我这个报表保存的路径这么写对不对?看了一下仍然存储到本地目录了
[此贴子已经被作者于2018/10/22 17:03:41编辑过]