Just a little macro push... set sub-topic text on insert

  • 2
  • Question
  • Updated 4 years ago
  • Answered
OK, let me first say that several of you have been kind enough to provide links and material that *should* answer this question, but I need to find the proper area to focus on because otherwise I may ready hundreds of pages of unnecessary material before I zero in on the proper area of focus.

I have created a very simple Map Part. it has the main topic, and three sub-topics, each with Notes. One of the subtopics is titled with the current date. The second (peer) sub-topic is titled with the current time. The last is just extraneous notes.

All I want to do is provide some way - automatically OR through a macro OR through a context menu selection OR through a chicken sacrifice that I can get MindManager to fill in / replace the dummy date and time I placed in the map part, with the actual date and time I perform whatever magical action I need to to make this work.

I am just too damn lazy to keep clicking in my little placeholder text every time I put an entry in here. Which, incidentally, has been about 400 times at this point.

Please, for the love of all that is good in the world - save me from click-craziness and a healthy dose of carpal tunnel syndrome!
Photo of Mike Danielski

Mike Danielski

  • 191 Posts
  • 6 Reply Likes

Posted 4 years ago

  • 2
Photo of Michael Deutch

Michael Deutch, Official Rep

  • 438 Posts
  • 75 Reply Likes
Can any of the macro gurus out there help with this?  (btw, I like the idea though for a future feature). 
Photo of Andrew Wilcox

Andrew Wilcox, Champion

  • 1033 Posts
  • 177 Reply Likes
Just in case - Ctrl-Shift-D will insert the current date.

Wondering why it doesn't insert date and time as stated on the Insert - Date and Time menu option?
Photo of Mike Danielski

Mike Danielski

  • 191 Posts
  • 6 Reply Likes
That does technically work, but not for my purposes. I am trying to reduce the number of mouse clicks to get the basic task "set up". Fully automatic would be ideal (of course). Using this menu requires more clicking than my current manual edit.

Now, if I could get a macro to fire those things off automatically, then we would be in business, because the "Insert Date and Time menu selection does have the correct format for both the date and time I use.
Photo of aHa!Coaching

aHa!Coaching, Champion

  • 1192 Posts
  • 116 Reply Likes
If you need to replace some dummy text with today's date in several topics, why not use Find and Replace on the whole map? :) Are alle the dummy texts the same?
Photo of Mike Danielski

Mike Danielski

  • 191 Posts
  • 6 Reply Likes
Yes, the dummy text is the same on all topics. Beyond that, this only applies to all new topics going forward. Actually, it really only applies to the two custom map parts I use 95% of the time. It is just a time-saving (and boring repetitious task elimination) need.
Photo of Nick Duffill

Nick Duffill, Champion

  • 508 Posts
  • 169 Reply Likes
If you want this to happen automatically when deploying a map part into a map, then a Generic Smart Map Part will be easier than an Add-in.

If you don't mind launching it manually, then a simple macro could be attached to (say) the topic context menu. The macro could update all topics in the map, not just the one under the selection. Something like the following (untested) code would be needed.

Sub Main
Dim m_Topic As Topic
 For Each m_Topic In ActiveDocument.Range(mmRangeAllTopics)
  If m_Topic.Text = "my date placeholder" Then
   m_Topic.Text = CStr(Now) ' needs custom date format
   'm_Topic.Task.StartDate = Now ' alternative
  End If
 Next
End Sub

If you are working with large maps and are comfortable with a bit of coding, then MindManager gives unrivalled flexibility for creating specialised tools. But of course some familiarity with the object model is needed. Also you have to remember to test on scratch maps before letting them loose on valuable ones.

Macros can be attached to menus under View > Macros > Organize macros.
Photo of Mike Danielski

Mike Danielski

  • 191 Posts
  • 6 Reply Likes
Thanks for the detail Nick - I will take a stab at it (I'm a developer, I just didn't know where to start, and how to conceptualize the way MindManager organizes and executes things) and see how it goes!