ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Running an app which requires quote defined parameters (https://www.excelbanter.com/excel-discussion-misc-queries/447357-running-app-requires-quote-defined-parameters.html)

JHB

Running an app which requires quote defined parameters
 
Hi:

I have a Excel set of macros (it has to run under Office 2000 and Office 2007), one of which calls another app which requites quote defined parameters.. I plan to use the Shell setup but am stuck in defining the actual call. The application requires a call that looks like this:

C:/convertxls.exe /S"C:\inputfolder\*.xlsx" /T"C:/Outputfolder/*.xls" /C-4143 /F51 /M2 /R /V

Note that there are quotes INSIDE the parameters. If I try and set the whole thing up defined by quotes it does not work, and if I break it into quotes defined groups connected with an & that does not work either.

Can someone suggest how I could set this up so that the application gets its parameters in a form it can understand.

Please


John Baker


Shell(ConvertCommand, 1)

Ron Rosenfeld[_2_]

Running an app which requires quote defined parameters
 
On Thu, 11 Oct 2012 04:05:25 -0700 (PDT), JHB wrote:

Hi:

I have a Excel set of macros (it has to run under Office 2000 and Office 2007), one of which calls another app which requites quote defined parameters. I plan to use the Shell setup but am stuck in defining the actual call. The application requires a call that looks like this:

C:/convertxls.exe /S"C:\inputfolder\*.xlsx" /T"C:/Outputfolder/*.xls" /C-4143 /F51 /M2 /R /V

Note that there are quotes INSIDE the parameters. If I try and set the whole thing up defined by quotes it does not work, and if I break it into quotes defined groups connected with an & that does not work either.

Can someone suggest how I could set this up so that the application gets its parameters in a form it can understand.

Please


John Baker


In VBA, in order to include quote marks within a string, merely "double" the quotes:

eg:
======================
Option Explicit
Sub foo()
Dim sCall As String
sCall = "C:/convertxls.exe /S""C:\inputfolder\*.xlsx"" /T""C:/Outputfolder/*.xls"" /C-4143 /F51 /M2 /R /V"
Debug.Print sCall
End Sub
====================

And in the intermediate window we see:

C:/convertxls.exe /S"C:\inputfolder\*.xlsx" /T"C:/Outputfolder/*.xls" /C-4143 /F51 /M2 /R /V

JHB

Running an app which requires quote defined parameters
 
On Thursday, October 11, 2012 7:35:02 AM UTC-4, Ron Rosenfeld wrote:
On Thu, 11 Oct 2012 04:05:25 -0700 (PDT), JHB wrote:


Thank you that was exactly what I needed.



Hi:




I have a Excel set of macros (it has to run under Office 2000 and Office 2007), one of which calls another app which requites quote defined parameters. I plan to use the Shell setup but am stuck in defining the actual call.. The application requires a call that looks like this:




C:/convertxls.exe /S"C:\inputfolder\*.xlsx" /T"C:/Outputfolder/*.xls" /C-4143 /F51 /M2 /R /V




Note that there are quotes INSIDE the parameters. If I try and set the whole thing up defined by quotes it does not work, and if I break it into quotes defined groups connected with an & that does not work either.




Can someone suggest how I could set this up so that the application gets its parameters in a form it can understand.




Please






John Baker






In VBA, in order to include quote marks within a string, merely "double" the quotes:



eg:

======================

Option Explicit

Sub foo()

Dim sCall As String

sCall = "C:/convertxls.exe /S""C:\inputfolder\*.xlsx"" /T""C:/Outputfolder/*.xls"" /C-4143 /F51 /M2 /R /V"

Debug.Print sCall

End Sub

====================



And in the intermediate window we see:



C:/convertxls.exe /S"C:\inputfolder\*.xlsx" /T"C:/Outputfolder/*.xls" /C-4143 /F51 /M2 /R /V



Ron Rosenfeld[_2_]

Running an app which requires quote defined parameters
 
On Thu, 11 Oct 2012 12:00:50 -0700 (PDT), JHB wrote:

Thank you that was exactly what I needed


Glad to help. Thanks for the feedback.


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com