Send2LinkedMap

From ActivityOwnerWiki
Jump to: navigation, search
'Send2LinkedMap
'18Jun07
'Send selected topic's subtopics to the map in its hyperlink
'http:www.activityowner.com
'http://creativecommons.org/licenses/by-sa/2.5/
'
Sub Main
	Set sourcedoc = ActiveDocument
	Set source = sourcedoc.Selection.PrimaryTopic
	If source.HasHyperlink Then
		If InStr(source.Hyperlink.Address,"mmap") Then
			source.Hyperlink.Follow
			Set destdoc=ActiveDocument
			For Each stopic In source.AllSubTopics
				sourcedoc.Selection.Set(stopic)
  	 			sourcedoc.Selection.Cut
				destdoc.Selection.Set(destdoc.CentralTopic)
				destdoc.Selection.Paste
			Next
		End If
	End If
End Sub