Copy link to clipboard
Copied
I am having problem placing an image to a Rectangle object. My code actually works before on an Indesign of my office PC (not sure with the version).
But now as I try it to my laptop, it has an Error of code #35869. The image does exists. I have tried modifying the path but still got the error.
I attached a link of the screenshot of the code and the error.
https://1drv.ms/u/s!Ag6AaBNH0sD171Jc5eyh_JsKVgls?e=ZTWBCA
I appreciate your help. Thank you!
In your screenshot, it looks like there's a space at the start of the path (" D:\\") . Check there maybe, or post a screenshot of where ImagePath is actually being generated?
Copy link to clipboard
Copied
Not sure, but i think the path in the imagePath variable is escaped wrongly. The path should have only a \, \\ should appear if you are writing the path in the code as a literal string. however i see \\ in the debug window as well. Change the argument passed into the addPhoto function to have just \\ and not \\\\ and then see what happens
-Manan
Copy link to clipboard
Copied
I have tried that already but still no luck.
Copy link to clipboard
Copied
Is the issue with this path particularly, i mean does the code work with the same image placed at a different location, or are you not able to use this code for placing any image file?
-Manan
Copy link to clipboard
Copied
This code actually works in my office PC. I will try to put it in other location.
Copy link to clipboard
Copied
I have tried putting the images to other location but still got the error.
Copy link to clipboard
Copied
But when I hardcoded the path, it works.
frame.place("D:\\dn\\clients\\sica\\images\\33-012.jpeg");
Copy link to clipboard
Copied
In your screenshot, it looks like there's a space at the start of the path (" D:\\") . Check there maybe, or post a screenshot of where ImagePath is actually being generated?
Copy link to clipboard
Copied
OMG! You are correct Brian! That very small mistake took me days. Thank you so much!
Copy link to clipboard
Copied
Gotta love Extendscript debugging! Glad I could help.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more