A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Formatting Long Documents
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Convert Footnotes to Hard Text ???



 
 
Thread Tools Display Modes
  #1  
Old January 14th, 2005, 03:11 AM
external usenet poster
 
Posts: n/a
Default Convert Footnotes to Hard Text ???

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?

*(((({

  #3  
Old January 18th, 2005, 02:56 AM
external usenet poster
 
Posts: n/a
Default

Thanks, Klaus -- I'll give it a try.

*(((({




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

|"*(((({" schrieb im Newsbeitrag ...
| 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?
|
| *(((({
|

|
|
|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
|

  #4  
Old January 19th, 2005, 03:41 AM
Doug Robbins
external usenet poster
 
Posts: n/a
Default

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

--
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
"*(((({" wrote in message
...
Thanks, Klaus -- I'll give it a try.

*(((({




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

|"*(((({" schrieb im Newsbeitrag
...
| 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?
|
| *(((({
|

|
|
|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
|



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenatd fields in a query for a searching form Marc Running & Setting Up Queries 8 October 19th, 2004 08:49 PM
find a date on sheet 2 and count text in that column jtinne General Discussion 4 October 4th, 2004 09:06 PM
Linking Text Box Richard General Discussion 8 August 7th, 2004 04:47 AM
Too many hyperlinks? [email protected] Powerpoint 7 May 25th, 2004 02:19 AM
How can I convert text to all lowercase? HBYardSale Setting up and Configuration 4 December 12th, 2003 06:24 AM


All times are GMT +1. The time now is 11:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.