Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / January 2005

Tip: Looking for answers? Try searching our database.

Convert Footnotes to Hard Text ???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
<*((((><{ - 14 Jan 2005 02:11 GMT
I've got a long document with a bazillion footnotes.  I'd like to
convert them to hard-coded text.  How do I do that?  

<*((((><{
Fishy@Ocean.Net
Klaus Linke - 14 Jan 2005 16:21 GMT
> I've got a long document with a bazillion footnotes.  I'd like to
> convert them to hard-coded text.  How do I do that?
>
> <*((((><{
> Fishy@Ocean.Net

Hi <*((((><{

Below's the macro I have been using...
Maybe you can improve on it a bit, or adapt it to your needs.

Greetings,
Klaus

Sub footnotestrip()
 Dim afootnote As Footnote
 Dim NumberOfFootnotes As Integer
 Dim i As Integer
 Dim aFootnoteReference As String
 Dim aFootnoteRefTag As String
 NumberOfFootnotes = ActiveDocument.Footnotes.Count
 For i = NumberOfFootnotes To 1 Step -1
   Set afootnote = ActiveDocument.Footnotes(i)
   afootnote.Range.Select
   Selection.MoveStartWhile Cset:=" " & Chr(9)
   Selection.Cut
   aFootnoteReference = afootnote.Reference.Text
   Select Case aFootnoteReference
     Case Chr(2)
       aFootnoteRefTag = "<FNZ>"
     Case "*"
       aFootnoteRefTag = "<FNS>"
     Case Else
       aFootnoteRefTag = "<FNRef>" _
       & aFootnoteReference & "</FNRef>"
   End Select
   afootnote.Reference.Select
   If afootnote.Reference.Text = Chr(40) Then
     With Dialogs(wdDialogInsertSymbol)
       aFootnoteRefTag = _
         "<FNSym," & .Font & "," _
         & .CharNum & ">"
     End With
   End If
   afootnote.Delete
   Selection.InsertBefore "<FN>" _
   & aFootnoteRefTag
   Selection.Collapse (wdCollapseEnd)
   Selection.Paste
   Selection.InsertAfter "</FN>"
 Next i
End Sub
<*((((><{ - 18 Jan 2005 01:56 GMT
Thanks, Klaus -- I'll give it a try.  

<*((((><{
Fishy@Ocean.Net

In the last exciting episode on Fri, 14 Jan 2005 17:21:51 +0100,

|> I've got a long document with a bazillion footnotes.  I'd like to
|> convert them to hard-coded text.  How do I do that?
[quoted text clipped - 48 lines]
|  Next i
|End Sub
Doug Robbins - 19 Jan 2005 02:41 GMT
The following would also work for footnotes, but it places them at the end
of the document, not at the foot of each page.

' 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

Signature

Please respond to the Newsgroup for the benefit of others who may be
interested.   Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP

> Thanks, Klaus -- I'll give it a try.
>
[quoted text clipped - 57 lines]
> |  Next i
> |End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.