When I save the file in html format, the footnotes disappear.
I tried converting the footnotes to endnotes, and still no
luck.
Any suggestions?
Thanks!
Evan Goldfine
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
The following macro will convert endnotes to "textnotes":
' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes
at end of document and
' 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
If you replace Endnote and Endnotes with Footnote and Footnotes, it will do
the same thing for footnotes.
Hope this helps,
Doug Robbins - Word MVP
Please post any follow-up to the Newsgroups so that others may benefit
therefrom or contribute thereto.
Evan Goldfine <ebgoldN...@yahoo.com.invalid> wrote in message
news:3d16fafc...@usw-ex0103-019.remarq.com...
Thanks for the program. I've entered the macro into my document,
but run into problems executing it.
Visual Basic says that there is an "Invalid outside procedure" in
the second line of code. (For Each aendnote In
ActiveDocument.Endnotes)
I am not experienced with macros. Perhaps I am doing something
wrong. Your help is greatly appreciated.
Thanks again,
Did you *paste* Doug's code (so no chance of a typo?)
Is that line all on one line?
(Also ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab &
aendnote.Range should alll be on one line).
Regards
Dave
Evan Goldfine <ebgoldN...@yahoo.com.invalid> wrote in message
news:25413909...@usw-ex0105-035.remarq.com...
I pasted it into visual basic, and it was all on one line (as was
the other line of code you referenced). I still get that invalid
procedure error message.
Any ideas?
Thanks!
Evan
If not type "Sub HTMLProc()" (without the quotes) and press ENTER. This should
automatically generate and "End Sub". Now paste the code between the Sub...End
Sub pair and see if it works.
regards
Grant Cartledge
I suspect that with the information provided by Grant and Dave, you probably
have this figured out by now,
However just to be sure, as Grant pointed out, the code needs to be pasted
between and Sub - End Sub in the VBE. The easiest way to get that set up
correctly is to select Macro from the Tools menu, then Macros and in the
Macros dialog, enter the name that you want to give to the macro in the
Macro name box and then click on Create. The VBE will then open with
Sub yournacroname()
' some comments about created by
End Sub.
The code that I sent to you should be pasted before the End Sub. To
overcome the problems that can occur with the email program inserting line
breaks in the code that can cause an error message, I have placed an
apostrophe and a line number at the beginning of each line of code:
'1 Dim aendnote As Endnote
'2 For Each aendnote In ActiveDocument.Endnotes
'3 ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab &
aendnote.Range
'4 aendnote.Reference.InsertBefore "a" & aendnote.Index & "a"
'5 Next aendnote
'6 For Each aendnote In ActiveDocument.Endnotes
'7 aendnote.Reference.Delete
'8 Next aendnote
'9 Selection.Find.ClearFormatting
'10 Selection.Find.Replacement.ClearFormatting
'11 With Selection.Find.Replacement.Font
'12 .Superscript = True
'13 End With
'14 With Selection.Find
'15 .Text = "(a)([0-9]{1,})(a)"
'16 .Replacement.Text = "\2"
'17 .Forward = True
'18 .Wrap = wdFindContinue
'19 .Format = True
'20 .MatchWildcards = True
'21 End With
'22 Selection.Find.Execute Replace:=wdReplaceAll
If when you paste this into the VBE, there are any un-numbered lines, place
the cursor at the beginning of that line and backspace to remove the line
break. You may then need to insert a space if it is obvious that there
should be one (the line breaks will have occured at spaces between words in
the commands. Finally, remove the apostrophe and the number from the
beginning of each line.
Hope this helps,
Doug Robbins - Word MVP
Please post any follow-up to the Newsgroups so that others may benefit
therefrom or contribute thereto.
Evan Goldfine <ebgoldN...@yahoo.com.invalid> wrote in message
news:25413909...@usw-ex0105-035.remarq.com...
> Doug,
>
> Thanks for the program. I've entered the macro into my document,
> but run into problems executing it.
>
> Visual Basic says that there is an "Invalid outside procedure" in
> the second line of code. (For Each aendnote In
> ActiveDocument.Endnotes)
>
> I am not experienced with macros. Perhaps I am doing something
> wrong. Your help is greatly appreciated.
>
> Thanks again,
> Evan Goldfine
>