automatically extract footnotes into new file and …

H

hrdwa

I need to import .docs (or possibly .docx) into InDesign. Footnotes need to
be a seperate file, footnote numbers in main text need to have a specific
character style applied to them. I can't ask the authors to sett up two
seperate files, they will deliver standard texts with the app's footnotes
function used. What I'm looking for is a way to automatically split this
standard file into two, one containing the main text, ideally with all the
footnote numbers getting a specifyable character style applied to them (but
if that's not possible, it would suffice to have them remain where they were
and apply this c.s. manually), the other containing the footnotes, equally
with the numbers kept and ideally with a second c.s. applied to them.

If there would be any way, and array of scripts or whatever to achieve this?
That would be of great great help. Thanks a lot in advance.
 
D

Doug Robbins - Word MVP

Use a modification of the following macro, replacing Endnotes with Footnotes

' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes
at end of document
' to replace the endnote reference in the body of the document with a
superscript number.
'
Dim aendnote As Endnote
For Each aendnote In ActiveDocument.Endnotes
ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab &
aendnote.Range
aendnote.Reference.InsertBefore "a" & aendnote.Index & "a"
Next aendnote
For Each aendnote In ActiveDocument.Endnotes
aendnote.Reference.Delete
Next aendnote
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Superscript = True
End With
With Selection.Find
.Text = "(a)([0-9]{1,})(a)"
.Replacement.Text = "\2"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
H

hrdwa

Hello Doug, thanks for your reply. I found out that, as Word's help states:
„Office 2008 for Mac cannot run Visual Basic macros or load add-ins that
contain Visual Basic macros.“. The alternative recommended by Microsoft is
using AppleScripts. I tried saving the code you posted as an AppleScript
(which I'm unfamiliar with, so I can't tell what it should look like), and
got the message: The document “Untitled†could not be saved.
Maybe someone has a solution for this, like converting the script (might it
be written in VisualBasic?) into AppleScript?
Thanks
 
D

Doug Robbins - Word MVP

May be someone in the microsoft.public.mac.office or
microsoft.pulblic.mac.office.word newsgroup will be able to help you.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
M

macropod

Hi hrdwa,

If you convert the footnotes to endnotes (References>Footnotes>Convert), ensuring the numbering is set to 'continuous', that'll put
all the footnotes at the end of the document, from where you can easily copy & paste them into another document.

To clean up the main document, you can simply delete the footnotes that you had previously copied. This will still leave their
markers in the body of the document, and you can use Find/Replace to re-format those your desired Style.

Find = ^e
Replace = ^&
Replacement Style = 'InDesignFootnote'

You can do the same for the destination document.
 
H

hrdwa

hello, many thanks macropod. I find one (and only one—is there another?) way
to convert footnotes to endnotes (in Word:Mac 2008). That is: click into one
of the footnotes, press cmd-a (selects all footnotes), contextual menu
(right-click): Convert to Endnote. That brings all footnotes to endnotes, and
for some reason I can't figure out turn the arab footnote numbers into roman
endnote numbers, both in the main text and in the endnotes themselves. Plus,
it applies a character style to them, called Endnote Reference.
That's all pretty promising for a start. I don't need to clean up, all I
have to do is place the whole doc in InDesign and then cut the endnote
section out. (The endnote numbers arrive as numbers with no function applied
to them, other than when placing a footnoted doc and keeping them as
footnotes.)

But one problem remains. In the .doc, endnote numbers both in the main text
and in the endnotes have the same Character Stype applied to them (named
Endnote Reference, as mentioned above). When placed in InDesign, the
Character Style remains applied only to endnote numbers in the main text.
Those to the endnotes themselves remain without any CS applied to them. Their
Paragraph Style is Endnote Reference+, Character Style is None.
This would require manual formatting of hundreds of endnote numbers, which
isn't really an option. Might there be a solution to this? Or am I starting
the whole thing the wrong way?
 
S

Suzanne S. Barnhill

In the original endnotes, the paragraph style should be Endnote Text, with
the Endnote Reference character style applied only to the reference marks.
If this is pasting into InDesign as a paragraph style called Endnote
Reference, then you'll need to make some changes in the document before
cutting. Select all the endnote reference marks in the notes only
(sequentially or simultaneously, by whatever method you can devise) and
remove the Endnote Reference style. Then (or as part of the same operation),
by the same method, apply the desired formatting as direct font formatting.

I say, "by whatever method you can devise" because I'm not confident about
how to do this in Macword. In Winword I would search for ^e (or use Browse
by Endnote) in the endnotes section only and replace the Endnote Reference
style with Default Paragraph Font and the desired font formatting.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
H

hrdwa

hello Suzanne, thanks a lot, that's very helpful. The way I figured out
now—for anyone interested—is: search for ^e with the option highlight all
items found in [endnotes] checked. That does what it should, and allows for
applying a seperate style to all endnote marks. Very good.
Now I have a question following up, concerning how to automate these steps.
But I think I'll ask this in a new thread and in the appropriate place.

Many thanks again to all of you, you've been a great help!
 
S

Suzanne S. Barnhill

Ah, yes, I didn't suggest "Highlight all items found" because I was
forgetting that it applies only to specific layers. But in fact the
reference marks should already have a separate style (the Endnote Reference
character style) applied. Where you seem to be running into trouble is that
that style is being interpreted by InDesign as a paragraph style (as opposed
to the underlying Endnote Text). That's why I suggested formatting the
reference marks using direct font formatting.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top