Link to home
Start Free TrialLog in
Avatar of Mark01
Mark01Flag for United States of America

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark01

ASKER

It worked, Kimputer! Thank you. Can you resolve the Process class error:
https://www.experts-exchange.com/questions/29079424/Process-Class-Error.html