Macro to export HTML?

Eric I. shared this question 6 months ago
Discussion Open

I can see that there is an ExportFilter for HTML, but I can't figure out how to use it. In the documtnation of the Document.saveAs() method it says


The SaveAs method only saves maps as native .mmap documents. You cannot specify a different extension (e.g. "xml") to save in a different format. Separate export code would be required to do that."

Can anyone help me figure out what that "separate export code" would look like?

Replies (2)


Hello Eric

I believe the functionality in the API related to HTML export is a relic from the days when MindManager could generate multi-page web sites. This worked by calling series of macros which interacted with some objects in the API to generate the export. This has been mostly superseded by the HTML5 single-page export of maps, but you can still turn the "Save as Web Pages" add-in back on in MindManager for Windows.

Any other format of export that is not built into MindManager would need some custom code, either a macro, an add-in or another programme that can access maps through MindManager's API.


Thanks Nick for confirming what I suspected. I was actually able to get this to work, though it isn't a very elegant solution.

My original requirement was to periodically automatically create a map based on our current data and export as an HTML page to be part of a dashboard.

Step 1. Process your data into an .md text file using the format in this article Map Automation macro provided by Pieter v. (Thanks Pieter!!). I used PowerShell to process my data, but you could use anything you want.

Step 2. Use Windows Task Scheduler to schedule the attached PowerShell script to run periodically. The attached script will:

  1. Open Mind Map,
  2. Run Pieter's script on the above generated .md,
  3. Export generated map to HTML,
  4. Save generated map,
  5. Close Mind Map.

Not very elegant but it does work. :-)

- Eric