Skip to main content
Known Participant
June 1, 2010
Question

Few Problem in VBS

  • June 1, 2010
  • 1 reply
  • 1644 views

Dear all,

I am working first time on vbs, I am facing two problem please see below.

---------------------Problem 1 (Joboption file is not get loaded in indesign application)--------------------------------------------

set idApp=CreateObject("InDesign.Application.CS4")

set myFileSysObject=CreateObject("Scripting.FileSystemObject")

idApp.Import InDesign.idExportPresetFormat.idPDFExportPresetsFormat, "C:\Test.joboptions")

-------------------Problem 2 (Copy all linked images [which are not linked from active indesign document path] to the path of active indesign document path and relink it). Please see my below apple script code----------------------------------------

tell application "InDesign CS4"

tell active document

set myFolderPath to get path

repeat with OLINK in (get links)

set LinkedPath to file path of OLINK

if LinkedPath is not (myFolderPath & name of OLINK) then

tell application "Finder" to set MovedFile to (move file LinkedPath to myFolderPath) as alias

relink (contents of OLINK) to MovedFile

update OLINK

end if

end repeat

end tell

end tell

The above code is working fine for AppleScript, and I want to convert it to vbscript, I know many of us can suggest/help me.

---------------------------------------------------------------------------------------------------------------------------

reagrds,

Poo

This topic has been closed for replies.

1 reply

Poo_DelAuthor
Known Participant
June 1, 2010

Hey Guys,

I tried a lot for loading joboptions but it throws some errors. I am damn sure so many of you can suggest/help me.

Regards,

Poo

Poo_DelAuthor
Known Participant
June 1, 2010

Dear All,

Below code is working fine when we are saving vbs file to script panel (script folder) of InDesign and running through Scripts windows.

set idApp=CreateObject("InDesign.Application.CS4")

set myFileSysObject=CreateObject("Scripting.FileSystemObject")

idApp.Import InDesign.idExportPresetFormat.idPDFExportPresetsFormat, "C:\Test.joboptions")

But the same above code is not working when I am trying to run through command line or just by double clicking on it. Can any one help me why it is not working from command line.

Regards,

Poo

Steven__
Inspiring
June 1, 2010

Which version of Windows? If > XP there may be permissions issues