Results 1 to 13 of 13
  1. #1
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Effects on footnotes when saving as a web page (2002 SP-2)

    Hi,

    http://students.hamilton.edu/2005/jrick/laws.htm is a Word document I saved as a Web page. Unfortunately, as you can see, the conversion's effect on the format of foot- and end-notes makes the text difficult to read.

    So, does anyone know if Word offers other options to display footnotes in a Word HTML file? Ideally, instead of raised text, I'd like the footnote to be unraised and in brackets: [x].

    BTW, the only reason I'm using Word as an HTML editor is because many of the documents I need to convert to HTML use Word-formatted foot- and/or end-notes.

    Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    I don't think that footnotes and end notes are "standard" HTML features.

    I found a link to Multi Code to HTML - utility. It was written for Word 97 and I haven't tried it myself, but it claims to handle footnotes and endnotes.

    And perhaps this macro will help.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    My eyes glaze over reading Word's HTML. Microsoft has a filter on its web site for Word 2000 code (search for Office HTML Filter), and there are third party utilities as well (e.g., HTML Tidy), all aimed at trimming down the unnecessary tags that Word inserts on the off chance that you will want to convert the HTML page back into a native Word document. I don't know why there isn't a filter for Word 2002; is there a new option on a menu or in the Save As drop-down that does it automatically??

  4. #4
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Hi Hans,

    As always, thank you so much! The second link was just what I needed! With 2 small problems.

    1. In changing the endnotes to "textnotes," the text loses its formatting, e.g., hyperlinks, italics. Would you change the macro to retain the formatting?

    2. After conversion to "textnotes," the notes are numbered with a tab between the number and the note. Would you add brackets around the number? E.g.: [1] The

  5. #5
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Hi,

    Yes, Word XP includes "Save as Web page" on the File menu.

    Unfortunately, I can't find any tools that trim the quite unnecessary tags Word inserts in its HTML documents. Does anybody know of any for Word XP?

    Thanks.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    StarOffice 6.0 does a decent job (I opened your HTML in Word, saved as DOC, then opened in SO, saved as Web Page). The new OpenOffice.org 1.1/StarOffice 7 probably does an even better job. But you'd have to restyle the footnotes yourself.
    Attached Files Attached Files

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Please note that the macro I posted a link to was not written by me; it was posted in the newsgroups by Word MVP Doug Robbins.

    Here is a modified version for footnotes; for endnotes replace all occurrences of FootNote by EndNote.

    Sub Foot2Text()
    ' Original version: Doug Robbins
    ' Adaptation: HansV

    Dim aFootNote As Footnote
    Dim rng As Range

    For Each aFootNote In ActiveDocument.Footnotes
    aFootNote.Range.Copy
    ActiveDocument.Range.InsertAfter vbCr & "[" & aFootNote.Index & "] "
    Set rng = ActiveDocument.Range
    rng.Collapse wdCollapseEnd
    rng.Paste
    aFootNote.Reference.InsertBefore "a" & aFootNote.Index & "a"
    Next aFootNote

    For Each aFootNote In ActiveDocument.Footnotes
    aFootNote.Reference.Delete
    Next aFootNote

    With Selection.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Replacement.Font.Superscript = True
    .Text = "(a)([0-9]{1,})(a)"
    .Replacement.Text = "2"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
    End With
    End Sub

  8. #8
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Hi Hans,

    Great; thanks! Just one last thing. Doug's macro erased the superscript format of the footnotes within the text and made them normal text within brackets. I prefer this, since superscripting adds unnecessary spacing between lines (at least in HTML). Perhaps you could therefore remodify the macro? Thanks, Hans!

    Jon

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Like this?

    Sub Foot2Text()
    ' Original version: Doug Robbins
    ' Adaptation: HansV

    Dim aFootNote As Footnote
    Dim rng As Range

    For Each aFootNote In ActiveDocument.Footnotes
    aFootNote.Range.Copy
    ActiveDocument.Range.InsertAfter vbCr & "[" & aFootNote.Index & "] "
    Set rng = ActiveDocument.Range
    rng.Collapse wdCollapseEnd
    rng.Paste
    aFootNote.Reference.InsertBefore " [" & aFootNote.Index & "]"
    Next aFootNote

    For Each aFootNote In ActiveDocument.Footnotes
    aFootNote.Reference.Delete
    Next aFootNote
    End Sub

  10. #10
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    <P ID="edit" class=small>(Edited by Jon_Rick on 13-Nov-03 22:50. )</P>Pefect! Thanks Hans!!

    http://students.hamilton.edu/2005/jrick/laws.htm

  11. #11
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Hi Hans,

    I just want to thank you again for your tremendous efforts--not just on this post but on many others, too. And, of course, to request one "last" change :-).

    How would I modify the macro so that it hyperlinks the footnotes within the text to the footnotes at the bottom? Note: I'd like the entire footnote, including the brackets, to be hyperlinked.

    Thanks buddy!

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    Sorry, this is beyond my capabilities. Perhaps somebody else knows how to do this.

  13. #13
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Effects on footnotes when saving as a web page (2002 SP-2)

    I think that's what you had originally, no? Maybe there's some way to combine the two approaches so you can take advantage of Word's conversion feature without creating whatever problem it was that necessitated the new code.

    My own macro to do this probably is lost to history, as I created it in 1998. My final result was to get all the necessary HTML into the document and then Save As text, rather than saving as HTML. If I'm able to locate that code, I will post it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •