Forum Replies Created
-
AuthorPosts
-
November 15, 2018 at 10:15 pm in reply to: Either the file does not exist, you do not have permission, or the file may be i #111603
Aman Mittal
MemberHi Ramy,
I had the same problem just a few days ago. Rename the file but do not open the file. Run InDesign application, Go To File–>Open–>Select the file–>Change Open as from Normal to Copy. Save the file again and you are good to go. hope, this works for you as well. Good luck!Aman Mittal
MemberHi Kai,
Thank you replying to the post. I regret to inform you that the footnote thread does not belong to me. It was written by Jarek who was kind enough to let me use it. I should have put his reference, I guess. That’s my bad. I might be able to do minuscule tweaks but definitely do not have the expertise to follow everything your solution provided. So, it would be great if you could help me regarding the same, in case you get some leisure time from your schedule.Thanks a lot for all the help. Greatly appreciated.
Regards,
Aman MittalAman Mittal
MemberSolved:
var
myDoc = app.activeDocument,
mStory = app.selection[0].texts[0].parentStory,
mEndNotes = myDoc.textFrames.add( {name:”EndNotes”} ),
k, len, cIP, currPara, currFoot, mMarkers;app.findGrepPreferences = app.changeGrepPreferences = null;
//———————————————
// edit doc.footnoteOption here
with (myDoc.footnoteOptions)
{
showPrefixSuffix = FootnotePrefixSuffix.PREFIX_SUFFIX_BOTH;
prefix = “[“;
suffix = “]”;
separatorText = “”;
markerPositioning = FootnoteMarkerPositioning.NORMAL_MARKER;
}
//————————————————————
// move endnotes to a separate textFrame
for (k=mStory.paragraphs.length – 1; k >=0; k–)
{
if (mStory.paragraphs[k].contents.search(/^\*+/) == 0)
{
currPara = mStory.paragraphs[k].move(LocationOptions.AT_BEGINNING, mEndNotes.parentStory);
currPara.words[0].remove();
}
}
//————————————–
// create footnote markers
app.findGrepPreferences.findWhat = “*+”;
mMarkers = mStory.findGrep();
len = mMarkers.length;
while (len–>0) {
cIP = mMarkers[len].insertionPoints[0].index;
mMarkers[len].remove();
mStory.footnotes.add( LocationOptions.AFTER, mStory.insertionPoints[cIP] );
}
//——————————————————-
// fill footnote contents with proper text
for (k=0; k < mStory.footnotes.length; k++) {
currFoot = mStory.footnotes[k];
mEndNotes.paragraphs[0].texts[0].move(LocationOptions.AT_END, currFoot.texts[0]);
if (mStory.footnotes[k].characters[-1].contents == “\r”) mStory.footnotes[k].characters[-1].remove();
}mEndNotes.remove();
-
AuthorPosts