How can selected note text be captured?
I tried using the "Topic.Notes.Get Selection( startLng, endLng)" method, and it will not compile. Not sure what I am missing.
Normally it should be something like this, but it seems to return empty values:
Sub Main Dim t As Topic Set t = ActiveDocument.Selection.PrimaryTopic MsgBox(t.Notes.SelectedText) End Sub
Mathieu is correct. It is a macro programming question.
I tried the same logic with "SelectedText" first and could not get the get it to work. So I tried the "GetSelection" call next (which prompted this posting) and could not even get it to compile with the required arguments. Based on this behavior I thought I was missing something if two different notes functions were not working as expected. Now I am not sure is this may be a product issue.
To answer Ary's question, my original intent was to use this function in custom formatting of notes in large complex maps.(eg select a portion of the text in a note and then run different macros for different formatting needs without having to manually repeat the steps.)
Many thanks for your attention!
Nigel's code technically works. However, you need to set the text manually (though the call start/end arguments) rather than by selecting the text via the mouse and having the procedure call return what was selected on screen.
Are there any other potential solutions for this issue?