求助!想要实现的功能:生成报表,并选择储存位置,但是不打开报表。下面的代码是生成好直接打开的,要怎么修改呢?
单击按钮
Forms("提示窗口").open
Application.DoEvents()'显示正在执行,请稍后
Dim tm As String = ProjectPath & "Attachments\处罚通知单.doc" '指定模板文件
Dim fl As String = ProjectPath & "Reports\处罚通知单.doc" '指定目标文件
Dim wrt As New WordReport(Tables("季度大检查记录表"),tm,fl) '定义一个WordReport
Dim str As String = ""
For Each r As Row In Tables("季度大检查记录表").rows '逐行生成报表
If r("经济处罚") = "是"
str = str & vbcrlf & r("存在问题")
End If
Next
str = str.Trim(vbcr).Trim(vblf)
wrt.Replace("[存在问题]",str)
wrt.BuildOne(Tables("季度大检查记录表").current)
wrt.Show() '显示报表
Forms("提示窗口").Close