Macro to resize columns in topic tables

  • 1
  • Question
  • Updated 1 week ago
Tables in notes cause a problem. Although the table property is set to a fixed column width, columns width changes randomly whenever the map is saved. As the map contains a lot of tables I’m trying to fix the column width using a macro. Problem is that I cannot find the property. I already contacted support but they do not support the development of macro's directly. The dis however point me to some older but still relevant resources: on the API and
So basically I am looking for the propertie to change the value shown in the screenshot.
With code like:

Sub ChangeTable(st As Topic)
If st.Notes.IsValid Then
    st.Notes.????????.Table(1).columns(1).Width= 400
End If
End Sub

Sub Main
Dim st As Topic
Each st In ActiveDocument.CentralTopic.AllSubTopics
     ChangeTable st
Next st

End Sub
Photo of André


  • 2 Posts
  • 0 Reply Likes

Posted 1 week ago

  • 1
Photo of Andrew Wilcox

Andrew Wilcox, Champion

  • 1025 Posts
  • 176 Reply Likes
You could try the following:
  • Create a simple one topic map
  • Create a note and table within it.
  • Save
  • Rename the file *.xml
  • Open the file in a text editor
  • And play spot the property names.
Photo of André


  • 2 Posts
  • 0 Reply Likes
Thanks, I tried but it doesn't show properties that I'm able to access in the macro editor.

In the API document I found:
Notes (Topic Notes): a self-contained document stored as XHTML inside a Topic, and displayed & edited in the UI. Mindjet 11 offers limited programmatic access to Notes; for example, tables and font colors cannot be accessed without parsing the XHTML. As well as XHTML, plain text and RTF versions of the topic notes can be written and read. Conversion of Notes to and from XHTML is slow, and processing of large maps by accessing RTF or plain text should be avoided. The user's selection in the Notes window cannot be accessed or controlled through the API. 

Apparently I have to parse the XHTML before the tables can be accessed. Does anybody know how that works? There is a method in the note object to export it to a file but that means I would have to change that file outside MindManager and import it into the note?