Hello,
I rewrote a JS code in VB. Everthing works fine except the red lines.
I open an eps-file, the script resaves the file as AI (remove the [converted]) and place the file in the same directory as the original eps-file.
A single file with a correct path (eg c:\test.eps -> c:\test.ai) works fine.
Set appRef = CreateObject("Illustrator.Application")
'new inserted
var doc=appRef.ActiveDocument
var destFile = appRef.Documents.add(decodeURI(doc.fullName).replace(/(?: \[Converted\])?\.eps$/, '.ai')) 'also remove "[Converted]" from filename
Set saveOptions = CreateObject("Illustrator.IllustratorSaveOptions")
saveOptions.Compatibility = 15 'Illustrator CS5
saveOptions.EmbedICCProfile=true 'embed ICCprofile
saveOptions.Compressed=true
saveOptions.PDFCompatible=true 'pdf output
appRef.Documents(1).SaveAs (destFile), saveOptions
appRef.Documents(1).Close 2
Set appRef = Nothing
I hope someone can help me