Using text variables to create file name on export
Hello,
I'm pretty much brand new to JavaScript so forgive me if this seems like a dumb question. But I've got an export script to create two files with specific names from a single InDesign document. The name of the InDesign file is a constant in both files however one needs to contain a variable customer name and the other will always contain "FOX".
The script is currently exporting the files correctly, as well as the naming conventions for everything except the customer name. Currently I have the customer name set up as a text variable in my InDesign template. When I go to export all I get for the customer name pdf is the InDesign file name plus [object TextVariable] instead of the definition I give the variable itself.
What I would like to have on export is
A123456 CUSTOMER.pdf (Customer of course being replaced with the text variable definition)
A123456 FOX.pdf
I'm probably missing something here but I can't figure out what. I've attached some screenshots here for the naming section of the script plus the result. Any advice would be appreciated. Thanks!


