This content has been marked as final. Show 2 replies
My first thought is that there's a typo--"idPastBoardCoordinates" should be "idPasteBoardCoordinates".
My second thought is that you've run into a page item that does not contain an image. Is that possible?
thank you for the reply. The spelling mistake is now corrected.
But the error ist the same.
Before ich use the Transform, I check for a image with
If myDocument.PageItems.Item(myItemLoopCounter).Images.Count > 0 Then
myScaleX = 100.42
myScaleY = 100 / myImageHoehe * 50
Rem this was my old (CS2) command
Rem myDocument.PageItems.Item(myItemLoopCounter).Images.Item(1).Resize myScaleX, myScaleY, , True, False, False
Rem ... and this is my attempt
Set myScaleMatrix = myInDesign.TransformationMatrices.Add(myScaleX / 100, myScaleY / 100)
myDocument.PageItems.Item(myItemLoopCounter).Images.Item(1).Transform idCoordinateSpaces.idPasteboardCoordinates, idAnchorPoint.idCenterAnchor, myScaleMatrix
I can see in the open document, that a graphikbox with picture is selected.
Now I have make another test: I delete the picture in thie first box and the script will now select the first (now empty) graficbox and go on to the next (with picture in it). There I get the same error as before.
Sorry for my english. Can you help me?