Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

VB Script for CS5

$
0
0

I am looking for help to update a VB script from InDesign CS2 to InDesign CS5. I have hit a snag with placing a graphic in a named or labeled Frame or box. It has been a few years since I have done much scripting so I am out of the loop of new things.

If I select the graphic box the script will place the graphic.The line that is commented out.

But when I try to place it using the label name it fails with error The requested member of the collection does not exist with code 800A7708

 

Here is a little of the code where I am having trouble.

 

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

Set fso = CreateObject("Scripting.FileSystemObject")

Set wshShell = WScript.CreateObject ("WScript.Shell")

 

 

Set myInDesign = CreateObject("InDesign.Application.CS5")

myInDesign.activate

 

set myDocument = myInDesign.Documents(1)

 

Set myPage = myDocument.Pages.Item(1)

 

 

''set MyRectangle = myDocument.Selection.Item(1)

 

 

set MyRectangle = myDocument.Pageitems.item("A1")

   

 

MyRectangle.Place "I:\5_EVOReady\3940249.pdf"

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

 

This code does work properly in Indesign CS2

Any thoughts or suggestions will be appreciated .


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>