+ Reply to Thread
Results 1 to 2 of 2

Sending a string variable to command line

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    1

    Sending a string variable to command line

    Hi!

    I am trying to send a variable string which is a filename, to the command line for ImageMagick to convert from a .tiff to .jpeg. Is there anyway to go about this? So far I have

    Sub convert()
    Dim intFile As Integer
    Dim import, export As String

    intFile = FreeFile()

    import = "C:\Documents and Settings\ct-xray\My Documents\new\ScatterFreeRadiograph90.tif"
    export = "C:\Documents and Settings\ct-xray\My Documents\new\ScatterFreeRadiograph90.jpg"


    Open "C:\WINDOWS\Temp\MyBatchFile.bat" For Output As #intFile
    Print #intFile, "CD C:\Program Files (x86)\ImageMagick-6.8.5-Q16"
    Print #intFile, "convert import export"

    Close #intFile
    End Sub

    Thanks in advance!

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Sending a string variable to command line

    Try this
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1