mana,
Thanks for posting. It seems we both were initially duped thinks that the tables would have to be duplicated in some manner. Turns out not to be the case. This adaptation of your dictionary and random processes is much faster:
Sub test5()
Dim oDic As Object, oRanNumGen As Object
Dim lngIndex As Long, lngRandom As Long
Dim lngCount As Long
Dim oRng As Range, oRng2 As Range
Dim oTbls As Tables
Set oTbls = ActiveDocument.Tables
Set oDic = CreateObject("scripting.dictionary")
Set oRanNumGen = CreateObject("system.random")
Application.ScreenUpdating = False
lngCount = oTbls.Count
Do
lngRandom = oRanNumGen.next_2(1, lngCount + 1)
oDic(lngRandom) = Empty
If oDic.Count = lngCount Then Exit Do
Loop
For lngIndex = 1 To oDic.Count
Set oRng = oTbls(oDic.keys()(lngIndex - 1)).Range
Set oRng2 = oTbls(lngIndex).Range
If Not oRng = oRng2 Then
oRng2.Tables(1).Delete
oRng2.FormattedText = oRng.FormattedText
End If
Next
lbl_Exit:
Set oTbls = Nothing: Set oRng = Nothing: Set oRng2 = Nothing
Set oDic = Nothing: Set oRanNumGen = Nothing
Exit Sub
End Sub
Where can I read up about system.random? I found an article but it didn't include the next_2 method. Also, what does dic(n) = Empty really do?