Macro: search for current content of pasteboard
Posted: Sat Apr 07, 2012 9:37 pm
I want to record a macro to embed (thousands of) footnotes.
In the documents the the footnote number markers are at the correct locations in the text, and the correspondingly numbered text of the footnotes are at the end of the file.
So I want to record a macro that searches for a footnote marker; copies the number, pastes that number into the find field to find the correspondingly numbered footnote text (which will then be cut and pasted at location of the marker).
All of this is fairly straightforward, except: the macro recorder does not record the action of copying and pasting the number into the find field; it records only the literal search done. That is, if "1" is copied from the first footnote marker and pasted in the Find field, it will record only that it searched for "1", and on the next loop, after copying "2" from the next marker, it will search for 1 again, instead of pasting "2" and searching for that.
Is there a way to make a macro search, on subsequent loops, for the current contents of the pasteboard rather than for a literal number?
In the documents the the footnote number markers are at the correct locations in the text, and the correspondingly numbered text of the footnotes are at the end of the file.
So I want to record a macro that searches for a footnote marker; copies the number, pastes that number into the find field to find the correspondingly numbered footnote text (which will then be cut and pasted at location of the marker).
All of this is fairly straightforward, except: the macro recorder does not record the action of copying and pasting the number into the find field; it records only the literal search done. That is, if "1" is copied from the first footnote marker and pasted in the Find field, it will record only that it searched for "1", and on the next loop, after copying "2" from the next marker, it will search for 1 again, instead of pasting "2" and searching for that.
Is there a way to make a macro search, on subsequent loops, for the current contents of the pasteboard rather than for a literal number?