A quick way to clear the formatting or styles in the entire map's Topic Notes
The Problem:
Due to cutting and pasting from various sources, the MindManager Topic Notes can contain text with various fonts and formatting.
Users can remove fonts and formatting by using Ctrl-A to select all the text in a note and then Ctrl-Spacebar to revert the text to the default style. This allows users to change to a uniform Notes Style
Users need to clear the formatting before changing styles because MindMansger (for some reason) preserves the fonts and font size in the note.
While users can select all topics in a map using Ctrl-A on a topic, they cannot select all the text in every Topic Note and use the Ctrl-Spacebar to remove the formatting from all the notes.
It would save a lot of time if users could quickly reset the Topic formatting in complex maps.
A possible Solution:
Develop a macro that selects all topics and recursively removes the formatting on all Topic Notes.
ChatGPT (via Copilot) suggests that this is possible, but I do not have the skill to write the macro and ChatGPT does not know how to do it MindManager.
you have to instruct it to write "mindmanager macros using winwrap",
also, sometimes you have to copy/paste the API for it.
you have to instruct it to write "mindmanager macros using winwrap",
also, sometimes you have to copy/paste the API for it.
I did see any methods for doing this in the API without also destroying hyperlinks, tables, bullet points and so on.
If the Notes text is only paragraphs of text then it would be possible to wipe fonts, bold, italic and underline, but other structures would also be lost.
I did see any methods for doing this in the API without also destroying hyperlinks, tables, bullet points and so on.
If the Notes text is only paragraphs of text then it would be possible to wipe fonts, bold, italic and underline, but other structures would also be lost.
Thank you for your responses. The following macro code works to clear the formatting on all Topic Notes found within a map. It returns the text to the default font and size. BEWARE: as Nick points out, it will also remove any links or bullet points in the Topic Notes. All text is preserved.
______________________________________________________________________________
'#Language "WWB-COM".
'This macro loops through MindManager Map Topics and removes the formatting from the Notes on each Topic. It returns any formatted text to the base Style font and size.
'WARNING: it will remove any links within Topic Notes.
Option Explicit
Sub Main
Dim objApp As Object
Dim objDoc As Object
Dim objTopic As Object
' Get the application object
Set objApp = CreateObject("MindManager.Application")
' Get the active document
Set objDoc = objApp.ActiveDocument
' Loop through each topic in the document
For Each objTopic In objDoc.Range(mmRangeAllTopics)
' Check if the topic has notes
If objTopic.Notes.Text <> "" Then
' Remove formatting from the notes
objTopic.Notes.TextRTF = objTopic.Notes.Text
End If
Next objTopic
' Clean up
Set objTopic = Nothing
Set objDoc = Nothing
Set objApp = Nothing
End Sub
_________________________________________________________________________
Thank you for your responses. The following macro code works to clear the formatting on all Topic Notes found within a map. It returns the text to the default font and size. BEWARE: as Nick points out, it will also remove any links or bullet points in the Topic Notes. All text is preserved.
______________________________________________________________________________
'#Language "WWB-COM".
'This macro loops through MindManager Map Topics and removes the formatting from the Notes on each Topic. It returns any formatted text to the base Style font and size.
'WARNING: it will remove any links within Topic Notes.
Option Explicit
Sub Main
Dim objApp As Object
Dim objDoc As Object
Dim objTopic As Object
' Get the application object
Set objApp = CreateObject("MindManager.Application")
' Get the active document
Set objDoc = objApp.ActiveDocument
' Loop through each topic in the document
For Each objTopic In objDoc.Range(mmRangeAllTopics)
' Check if the topic has notes
If objTopic.Notes.Text <> "" Then
' Remove formatting from the notes
objTopic.Notes.TextRTF = objTopic.Notes.Text
End If
Next objTopic
' Clean up
Set objTopic = Nothing
Set objDoc = Nothing
Set objApp = Nothing
End Sub
_________________________________________________________________________
---