Adding a primary topic and it becoming the selected(focused?) topic by VBA
Using VBA, I would like that when I have selected a topic, I can then run a macro that produces topics at the same level and populates each of the new topics from an array. The original selected topic would contain the first element of the array.
I have managed to get close in that I can build sub-topics from the currently selected topic and populate them.
Here is a portion of the code:
'For counter = 0 To UBound(MyArray)
'Set currentTopic = .Selection.PrimaryTopic.AllSubTopics.Add
I then have to delete the original selected topic in order to leave the created sub-topics behind.
I am sure the problem is around this line: 'Set currentTopic = .Selection.PrimaryTopic.AllSubTopics.Add
But I cannot work it out.
Many thanks in advance for any suggestions.