'#Reference {A3B5C45B-F842-44fc-A5E5-50CED69BA86E}#2.0#0#C:\Program Files\Mindjet\MindManager 6\Mm5WebExport.dll#Mm5webexport 2.0 Type Library
'#Uses "GlobalParameterNames.mmbas"
'#Uses "GlobalUtilities.mmbas"
'#Uses "ParameterNames.mmbas"
'#Uses "TOCHandler.cls"
Option Explicit

Sub Main
    Dim m_Addin As Mm5WebExportAddIn
    Dim m_Webex As WebExport
    Dim oneTOCHandler As TOCHandler
    
    Set m_Addin = WebExportHelper.WebExportAddIn
    Set m_Webex = m_Addin.ActiveWebExport

    On Error GoTo ReportError

    m_Webex.Trace("Entering BeginExport", 2)

    'Build table of contents number array for topics
    Set oneTOCHandler = New TOCHandler
    oneTOCHandler.BuildOutlineNumberList(m_Webex.Document.CentralTopic)
    Set oneTOCHandler = Nothing

    m_Webex.Trace("Exiting BeginExport", 2)
    
    Exit Sub
   
ReportError:
    ProcessError(m_Webex)
    Exit Sub
   
End Sub
