Copy link to clipboard
Copied
I cannot find a script or a function in Illustrator that will create a text box that automatically populates with my current illustrator document file name?
This is very easily done in InDesign by going to the Type menu > Text Variables > Insert Variable > File Name. But this is not available in Illustrator for some reason. Does anyone have any suggestions?
Copy link to clipboard
Copied
in the future, to find the best place to post your message, use the list here, https://community.adobe.com/
p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.
<"moved from cc desktop">
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks for sharing this @Monika Gause !
I tried copying the script from that post you referenced (see script below) but I keep getting a syntax error (see screenshot) when I try to import it into Illustrator. It’s very likely I’m doing something wrong – I have very limited experience dealing with scripts.
Script copied from reference post:
// CODE BEGIN
var pointTextRef = app.activeDocument.textFrames.add();
pointTextRef.contents = app.activeDocument.name;
pointTextRef.top = 20;
pointTextRef.left = 10;
// CODE END
Copy link to clipboard
Copied
Do not save it in Word!
Save it with Editor or similar as (plain text) .txt
And then simply rename the extension from .txt to .jsx