Is it possible to write a macro/vba code in Word (2000 or Mac; upgrading the version may be in the cards if necessary) to find foot/endnote references in a document and copy them in a different format?
I’m not sure if I’m phrasing this well, so here’s the end goal:
We want to take a Word document with foot- or endnotes and import it into Quark (6 now, 8 soon). When Quark imports a document from Word, it skips over the footnote reference (the number) and instead inserts a blank space. It doesn’t import the footnotes at all (well, there are ways to shuffle things, but that’s a different question).
If, however, we could first have Word go through the document and every time it sees a footnote reference, change it to plain superscripted (or bold, or something identifiable) text that matches the original (i.e., it would keep the numbering), life would be extraordinarily easier.
We primarily do layout work on a Mac (so Applescript may be an option), but work on the text on a PC – so both platforms are available.
Well, I just finished this up and then realized that I think I misinterpreted your original request: what the following does is replace the footnote reference with a super-scripted footnote number with the actual text content of the footnote itself also included in the superscript. If that’s helpful to you, dandy! If not, just replace
r1.InsertAfter Str(ft.Index)
ActiveDocument.Range(mark, mark + Len(Str(ft.Index))).Font.Superscript = True
You will no doubt need to fiddle around with it a bit, but this should get you going in the right direction…
Sub fixie()
Dim ft As Footnote
Dim r1 As Range, ftstr As String, mark
For Each ft In Word.ActiveDocument.Footnotes
Debug.Print ft.Index & ft.Range.Text
mark = ft.Reference.Start
Set r1 = ActiveDocument.Range(ft.Reference.Sentences(1).Start, ft.Reference.Start)
ftstr = ft.Range.Text
r1.InsertAfter Str(ft.Index) & ftstr
ActiveDocument.Range(mark, mark + Len(Str(ft.Index) & ftstr)).Font.Superscript = True
Next ft
For Each ft In Word.ActiveDocument.Footnotes
ft.Delete
Next ft
It’s available for Mac and PC and has a 45-day free trial.
Usual disclaimers: I (and many editors, publishers, and corporations) am just a very happy customer who uses several Editorium tools every day. Jack Lyon, the owner, gives the best tech support I’ve ever encountered.