Batch to VB App

The following command and arguments run without any errors if they are run in a batch file.

"C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe" -e "C:\test_3\People_1.rpt" "Export_Format:Adobe Acrobat (pdf)" "Export_File:C:\test_3\People_1.pdf"

Open in new window

However, Visual Cut returns an error when the code shown below is run. The code runs in Visual Studio without any errors.

Batch File:
"C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe" -e "C:\test_3\People_1.rpt” "Export_Format:Adobe Acrobat (pdf)" "Export_File:C:\test_3\People_1.pdf"

Open in new window

VB App:
        Dim retval As String
        Dim ls_temp As String
        ls_temp = "C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe " & _
"-e ""C:\test_3\People_1.rpt "" ""Export_Format:Adobe Acrobat (pdf) "" ""Export_File:C:\test_3\People_1.pdf"""
        retval = Shell(ls_temp)

Open in new window

Visual Cut Error:
[C:\test_3\People_1.rpt ]: Requested Export Format (Not recognized) is not Supported.: 1/24/2018 3:04:17 PM

The batch, Visual Cut and VS are on the same machine. I've checked the paths several times. I am the admin user.

Please help me find the error.
Who is Participating?
ls_temp = """C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe"" " & _
"-e ""C:\test_3\People_1.rpt"" ""Export_Format:Adobe Acrobat (pdf)"" ""Export_File:C:\test_3\People_1.pdf"""

Open in new window

Mark01Author Commented:
It worked, Kimputer! Thank you. Can you resolve the Process class error:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.