Ask Your Question

macro to convert plain text footnotes

asked 2016-06-09 19:43:27 +0100

paul1149 gravatar image

I encounter a lot of documents of older books in which the footnotes or endnotes have been rendered in plain text right in the main text stream. Somewhere in a paragraph will be a marker like "[78]", and then later on, at the chapter end or stuck in the text at what originally was the page bottom (but now no longer is) is the actual note, such as:

[78] There was, however, no community of goods.

In MS Word I had a macro that did an amazing job of finding, gathering and converting these notes to actual linked, sequential footnotes. It was beyond my own abilities, someone kindly wrote it for me. And I have far less ability in LO Basic than I did in VBA.

I've come up with a conceptional way to do it. Search backward from the end of file for [1], delete the found string, cut the ensuing paragraph. Then search again for [1] to get the footnote location, insert a footnote there, then paste the text into the footnote.

I'm sure it's not the best method, but it works. But I have to figure out how to search for a variable, because I then need to increment the footnote number within a For/Next loop and start again. And I haven't found that anywhere.

Does anyone have a clue how to create such a macro, or know of a likely place to ask?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-11-06 21:26:58 +0100

Hakan gravatar image

There is an extension named Altsearch which flawlessly does the job.

edit flag offensive delete link more

answered 2016-08-12 20:30:17 +0100

paul1149 gravatar image

I now have a working macro. If interested, contact me for details.

edit flag offensive delete link more


Hi Paul,

can you also post the relevant macro here?

Hakan gravatar imageHakan ( 2017-07-30 10:35:42 +0100 )edit
Login/Signup to Answer

Question Tools



Asked: 2016-06-09 19:43:27 +0100

Seen: 165 times

Last updated: Nov 06 '17