'#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 "ParameterNames.mmbas"
'#Uses "GlobalUtilities.mmbas"

Option Explicit

Sub Main

    Dim addin As Mm5WebExportAddIn
    Dim webex As WebExport

    Set addin = WebExportHelper.WebExportAddIn
    Set webex = addin.ActiveWebExport

    Dim bodyString As String
    Dim topicString As String
    Dim OutlineItems As String
    Dim styleSheetPath As String

    On Error GoTo ReportError

    webex.Trace("Entering EndExport " + CStr(webex.GetParameter(WeErrorNumber)), 2)

	' If there's no pending error
    If webex.IsSuccessful Then

	   'set CSS file parameters
	   webex.SetParameter(TcpLinkColor, CssRgbColorString(webex.GetParameter(TsColorLink)))
	   webex.SetParameter(TcpVLinkColor, CssRgbColorString(webex.GetParameter(TsColorVLink)))
	   webex.SetParameter(TcpALinkColor, CssRgbColorString(webex.GetParameter(TsColorALink)))

        ' copy and process CSS file
	   ProcessFile webex, "styles.css"

       ' Copy our linked documents to the Linked Documents folder
       webex.CopyLinkedDocuments()

    End If

    webex.Trace("Exiting EndExport " + CStr(webex.GetParameter(WeErrorNumber)), 2)

    Exit Sub
   
ReportError:
    ProcessError(webex)
    Exit Sub
   
End Sub
