Word - HTML

This is my Word - HTML page. - (Written with HomeSite 2,5 Oh, no but HTML-Kit ! ;-)

Now you had better use Word 2000 and Office HTML Filter 2.0. See: http://office.microsoft.com/downloads/2000/Msohtmf2.aspx


(Old page from this down)

The construction of this page is just in the beginning...

I have been doing some work to make Word my HTML editor. With Word 6 I made a large macro packet for this reason. If you dare you can take a look at it, the documet template can be found here: http://cc.oulu.fi/~epikkara/ep_html.dot I do not know why - maybe the packet was too large for my machine or in my machine was something leaking - but then the Word6 macro engine started to make occasionally funny calculating errors (1 + 1 = 870 etc.). I tried many thing and at the end get more memory and diskspace and updated to Word98. Now I am working with it...

(Multi Code to HTML - utility is ready to test!)
Here are some snibbets:
How to change Word97 footnotes (and endnotes) to hyperlinked endnotes:

(Under there is the old code from my Word6 macros, but it is seen via VBA97 editor - and it is in Finnish)

Sub Footnotes2Html()
'
' Footnotes to Html notes Macro
'
Dim aRange As Range, bRange As Range, i As Integer, a As Integer, t As String
Application.ScreenUpdating = False
'endnotes to footnotes
If ActiveDocument.Endnotes.Count  0 Then ActiveDocument.Endnotes.Convert
If ActiveDocument.Footnotes.Count = 0 Then Exit Sub
a = ActiveDocument.Footnotes.Count
'aRange = start and bRange = end of doc
Set aRange = ActiveDocument.Range(Start:=0, End:=0)
Set bRange = ActiveDocument.Range(Start:=ActiveDocument.Content.End - 1, _
    End:=ActiveDocument.Content.End - 1)
'"NOTES" line to the end
With bRange
    .InsertParagraphAfter
    .InsertAfter Text:="NOTES"          'This could be formattet to Heading
    .InsertParagraphAfter
    .Collapse direction:=wdCollapseEnd
End With
i = 0
'loop of all footnotes
For Each Footnote In ActiveDocument.Footnotes
    i = i + 1
    StatusBar = "Footnotes to HTML: " & i & "/" & a
'make new footnote to the end with link & bookmark
    With bRange
        .InsertAfter Text:="[" & i & "]"
        ActiveDocument.Bookmarks.Add Range:=bRange, Name:="FN" & i
        .InsertAfter Text:=" "
        .MoveEnd unit:=wdCharacter, Count:=-1
        ActiveDocument.Hyperlinks.Add Anchor:=bRange, Address:="", _
            SubAddress:="FM" & i
        .SetRange Start:=ActiveDocument.Content.End, _
            End:=ActiveDocument.Content.End
        .InsertAfter Text:=Footnote.Range.Text
        .InsertParagraphAfter
        .Collapse direction:=wdCollapseEnd
    End With
'replace footnotemarker with link & bookmark (and delete the footnote itself)
    Set aRange = Footnote.Reference
    With aRange
        .Expand unit:=wdCharacter
        .Text = "[" & i & "]"
    End With
    ActiveDocument.Bookmarks.Add Range:=aRange, Name:="FM" & i
    ActiveDocument.Hyperlinks.Add Anchor:=aRange, Address:="", _
        SubAddress:="FN" & i
Next
'OK ???
End Sub
(Here is the old code from my Word6 macros, but it is seen via VBA97 editor - and it is in Finnish)
Public Sub MAIN()
Dim x
Dim i
Dim a$
WordBasic.WaitCursor 1
WordBasic.ScreenUpdating 0
WordBasic.StartOfDocument
WordBasic.PrintStatusBar "Koodataan alaviitteitä"
WordBasic.EditFind Find:="^f", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, Format:=0, Wrap:=1
x = WordBasic.EditFindFound()
If x = -1 Then
    WordBasic.EndOfDocument
    WordBasic.InsertPara
    WordBasic.Insert "<HR"
    WordBasic.InsertPara
    WordBasic.Style "Otsikko 2"
    WordBasic.Insert "Huomautukset"
    WordBasic.InsertPara
    WordBasic.StartOfDocument
    WordBasic.PrintStatusBar "Koodataan alaviitteitä"
    i = 0
    While x = -1
        WordBasic.StartOfDocument
        WordBasic.PrintStatusBar "Koodataan alaviitteitä"
        WordBasic.EditFind Find:="^f", Direction:=0, MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, Format:=0, Wrap:=1
        x = WordBasic.EditFindFound()
        If x = -1 Then
            i = i + 1
            WordBasic.ViewFootnoteArea 1
            WordBasic.WordRight 1
            WordBasic.ParaDown 1, 1
            WordBasic.CharLeft 1, 1
            WordBasic.EditCopy
            WordBasic.ViewFootnoteArea 0
            WordBasic.WW6_EditClear
            a$ = Mid(Str(i), 2)
            WordBasic.Insert "<A NAME=" + Chr(34) + "AVM" + a$ + Chr(34) + "<A HREF=" + Chr(34) + "#AV" + a$ + Chr(34) + "[" + a$ + "]</A</A"
            WordBasic.EndOfDocument
            WordBasic.Insert "<A NAME=" + Chr(34) + "AV" + a$ + Chr(34) + "<A HREF=" + Chr(34) + "#AVM" + a$ + Chr(34) + "(" + a$ + ")</A</A "
            WordBasic.EditPaste
            WordBasic.InsertPara
        End If
    Wend
    WordBasic.InsertPara
End If
End Sub