View Single Post
  #3   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Bill From DegiCank
 
Posts: n/a
Default Footnotes and Endnotes, dealing with them from older programs in MS Word

I get a run time error 13 when I try the macro, most likely somthing
I'm doing wrong.

Here's what show's up when I debug:

If .Paragraphs(i).Range.Words(1) = j + 1 Then

Here's a little more about the project I'm working on if anyone is
intersted.

I get a PDF from this site:
http://www.ca9.uscourts.gov
clicking opinions brings you he
http://www.ca9.uscourts.gov/ca9/newo...0&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 he
http://degicank.com/doc/

I figured the best way to go about this is to write a macro which i'm
working on which brings me to this issue. In the macro I'm working I
cannot find the superscript text. For example I want to just find the
superscript 1, delete it and place a reference there for a footnote.
When I try to record the macro it will go after any number and ignores
the superscript effect.

Anyone know how to make a macro that will specifically find a
superscript font?

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 6/2/2006 by William Speers
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "1"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
With Selection
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleArabic
End With
.footnotes.Add Range:=Selection.Range, Reference:=""
End With
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "2"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
With Selection
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleArabic
End With
.footnotes.Add Range:=Selection.Range, Reference:=""
End With
Selection.Find.ClearFormatting
With Selection.Find
.Text = "3"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
With Selection
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleArabic
End With
.footnotes.Add Range:=Selection.Range, Reference:=""
End With
Selection.HomeKey Unit:=wdStory
End Sub