• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cant Define Original Document File Name in the Function!

Enthusiast ,
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
Mohammad Hasanin
TOPICS
Scripting

Views

178

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

Enthusiast , Apr 06, 2021 Apr 06, 2021

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

Votes

Translate

Translate
Enthusiast ,
Apr 06, 2021 Apr 06, 2021

Copy link to clipboard

Copied

LATEST

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

Best
Mohammad Hasanin

Votes

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