Sure. Copy (or Cut) something, and make sure there is no hard return at the end (that's real ugly, as it would add a blank line at the bottom of the note). Then go to the position where you want the footnote, then run this script:
fn = app.selection.footnotes.add(); fn.texts.insertionPoints.item(-1).select(); app.paste(); fn.texts.appliedParagraphStyle = "note";(Replace the style name "note" with the one you want.)There is no need for the script to insert a Tab after the footnote number; you can set that in the Document Footnote Options (adding one tab is even the default setting).Fastest way to do this would seem to open another window, focused on the end notes. Switch windows, cut, switch windows, click the right place, run script. Repeat until done, or sufficiently bored to call it a day. For hyperspeed, add a shortcut key to the script!
[Ed#2] Oops. Tab should go before the note number. Okay, add this line after the last one:
fn.insertionPoints.item(0).contents = "\t";
(What's with the ugly formatting under a piece of code? Another jive-up!)
Thank you very much!! That works great and will save me tons of time (and I did make a shortcut to the script). The only refinement would be if it could be made to apply the style without stripping out the formatting (italics) that appear in some of the notes.
O-o-o -- the safe way to handle local overrides is to replace them with character styles (and my own preptext does this).
Try this new script; the applyParagraphStyle function has an optional argument 'override', which, when set to false, will not override locally applied formatting.
fn = app.selection.footnotes.add(); fn.texts.insertionPoints.item(-1).select(); app.paste(); // fn.texts.appliedParagraphStyle = "note"; fn.texts.applyParagraphStyle(app.activeDocument.paragraphStyles.item("note"),false); fn.insertionPoints.item(0).contents = "\t";
Thank you again, that works perfectly.