在批处理文件中使用 VB 变量
我使用 VB 创建了以下批处理文件:
Open sBatchFile For Output As #1
Print #1, "@ECHO OFF"
Print #1, "ECHO Converting Excel Files to PDF, Please wait..."
Print #1, "batchpdf ""\\Tiltonsrv1\officeplantshared\Schedule_3.xls"" ""\\Tiltonsrv1\officeplantshared\SHIFT_SCHEDULES\"" &fileName& "
Close #1
i = Shell(sBatchFile, vbMaximizedFocus)
Application.Quit
End Sub
但无法识别变量 fileName。我是否正确地将其放入文件中?
I created the following batch file using VB:
Open sBatchFile For Output As #1
Print #1, "@ECHO OFF"
Print #1, "ECHO Converting Excel Files to PDF, Please wait..."
Print #1, "batchpdf ""\\Tiltonsrv1\officeplantshared\Schedule_3.xls"" ""\\Tiltonsrv1\officeplantshared\SHIFT_SCHEDULES\"" &fileName& "
Close #1
i = Shell(sBatchFile, vbMaximizedFocus)
Application.Quit
End Sub
But the variable fileName isn't recognized. Am I putting it into the file correctly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想你想要:
I think you want: