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!