I want to create a macro called InsertLink that inserts a link from another document from the clipboard at the current selected text in my document. For example, I have a document with the words ListView and TreeView. I selected ListView in my document. I then went to the ListView class in System.Windows.Controls and selected its URL to use as my link. I created a macro in my document called InsertLink to be activated by the keys Alt + I + L. I created the macro as follows using the keyboard:
Alt, N, I, I, Ctrl + V, Enter
The Alt, N switches Word to the Insert page.
The first 'I' opens the Link dropdown.
The second 'I' opens the Insert Link... dialog box.
Ctrl + V inserts the URL.
Enter closes the dialog box and the ListView link is set in my document.
I then ended (saved) the macro.
However, if I then select TreeView, go to the TreeView class in System.Windows.Control and select its URL to use as the TreeView link, when I run the macro, it inserts the ListView link into the selected TreeView text. How do I set up the macro so that each time I run it, it uses the current text in the clipboard, not the text that was put there the first time it was run?