Hi Bill,
That sounds like your selected footnote range might have a numbered para
with no text or an un-numbered paragraph. I didn't allow for the former and
you'll recall I mentioned the latter, and how to deal with it, in my
previous post.
Cheers

Signature
macropod
[MVP - Microsoft Word]
> I get a run time error 13 when I try the macro, most likely somthing
> I'm doing wrong.
[quoted text clipped - 9 lines]
> http://www.ca9.uscourts.gov
> clicking opinions brings you here:
http://www.ca9.uscourts.gov/ca9/newopinions.nsf/Opinions+by+date?OpenView&Start=
1&Count=100&Expand=1.1
> For this particular example lets look at this case:
> 06/01/06 03-56712 J HYDRICK V DEMORALES
http://www.ca9.uscourts.gov/ca9/newopinions.nsf/A21927B11E3B07C88825717F0076B726
/$file/0356712.pdf?openelement
> Long story short I've taken the PDF and converted it to a Word DOC. I'm
> putting them both on my homepage for ease of use here:
[quoted text clipped - 90 lines]
> Selection.HomeKey Unit:=wdStory
> End Sub
captaingeek - 06 Jun 2006 00:35 GMT
Been banging my head off the wall here trying to figure this out with
no luck.
Macropod, do you have an example paragraph I could run this on?
Anyway, by reading the macro you made I was able to figure out how to
find superscript font's.
With this knowledge, and the rest of your macro I may be able to create
a better macro that will meet our needs.
I will let you know.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/5/2006 by William Speers
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "1"
.Replacement.Text = ""
.Forward = True
.Font.Superscript = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
macropod - 06 Jun 2006 09:47 GMT
Hi Bill,
The code I posted works fine on a document that has the footnotes grouped at
the end and selected, as described in my original post. The document you're
converting from pdf (not a document "with footnotes from older programs" as
you originally described it) already has the footnotes formatted as such at
the bottom of each page.
Finding superscripted text in the document and converting it to a Word
footnote link is trivial, and my code shows you how to do that.
Without selecting the footnote text, getting Word to recognise where the
corresponding footnote for any superscripted body text sits in the document
can be problematic, especially if the footnote continues onto the next page,
as it does with your footnote 3, for example. That's why my code works from
the premise that the footnotes were grouped at the end and selected.
If you can at least:
. put the whole of each footnote together in one paragraph; and
. make sure each footnote has a space separating the footnote number and the
first word of the footnote,
then a few minor modifications to my code should get you under way.
The modifications would be to:
. add a new variable near the top:
Dim k As Integer
. change the line:
j = 0
to
k = Paragraphs(1).Range.Words(1) - 1
j = k
. change the two lines
For i = 1 To j
to
For i = k + 1 To j
With these modifications, the macro will process all footnotes in the
selection starting from whatever number the first selected footnote
paragraph starts with.
Cheers

Signature
macropod
[MVP - Microsoft Word]
> Been banging my head off the wall here trying to figure this out with
> no luck.
[quoted text clipped - 27 lines]
> .MatchAllWordForms = False
> End With