
05-08-2018, 05:02 AM
|
Novice
|
|
Join Date: Mar 2018
Posts: 15
|
|
Quote:
Originally Posted by Guessed
This would work adequately if you selected the paragraphs before running the macro.
Code:
Sub RandomiseParas()
Dim aPar As Paragraph, i As Integer
For Each aPar In Selection.Paragraphs
i = Rnd() * 1000
aPar.Range.InsertBefore Format(i, "000") & vbTab
Next aPar
Selection.Sort ExcludeHeader:=False, FieldNumber:="Paragraphs", _
SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending, _
Separator:=wdSortSeparateByTabs
WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1
End Sub
|
Thanks; no way to be done without Macro?
|