Hi,
I made a macro to duplicate selected words according to its sequence in a sentence
Code:
Sub DuplicateSelectedWords()
Dim oRng As range
If Len(Selection.range) = 0 Then
MsgBox "Select the text first", vbCritical
Exit Sub
End If
Set oRng = Selection.range
oRng.Copy
oRng.InsertAfter (oRng.text)
End Sub
It works fine for continues selection, but not for individual selection, which I mean selecting random word (by using Ctrl) in a sentence then duplicate it by run the macro
For individual selection, it just duplicate only one word, may be the first word or second or the last.
So please how to edit the current macro to duplicate all selected words ( individual selection) also.
Thanks