Cant Define Original Document File Name in the Function!

Engaged ,
Apr 06, 2021 Apr 06, 2021

Copy link to clipboard

Copied

Hi Pros

Please help, I'm Seasonal Developer, not rememebring every aspect in javascript, please help me to fix the function code, its just continue to save file with the name (Object Document) instead of the Original File Name, I don't get what i'm missing, i will appreciate any help , thanks in advance.

function saveAsIndd()
{
     var doc = app.activeDocument;
     var folderSelect, saveFile;
     fileName = doc;
     folderSelect = Folder.selectDialog("Please select a Folder to Save InDesign File");
     if (!folderSelect) return;
     saveFile = File(folderSelect+"/"+fileName);
     doc.save(new File(saveFile+".indd"));
}

 Best Regards

Mohammad Ibrahim

Best
M.Hasanain
TOPICS
Scripting

Views

63

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Engaged , Apr 06, 2021 Apr 06, 2021
Sorry I remeber i Have to Add (doc.name) , 

Likes

Translate

Translate
Engaged ,
Apr 06, 2021 Apr 06, 2021

Copy link to clipboard

Copied

LATEST

Sorry I remeber i Have to Add (doc.name) , 

Best
M.Hasanain

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines