代码之家  ›  专栏  ›  技术社区  ›  BioXhazard

在批处理文件中使用VB变量

  •  1
  • BioXhazard  · 技术社区  · 16 年前

    我使用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
    

    1 回复  |  直到 14 年前
        1
  •  3
  •   LittleBobbyTables - Au Revoir    16 年前

    我想你想要:

    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 
    
    推荐文章