Hi,
I want to sort the fields from Descending to Ascending by a string length (Largest to smallest) before replacing on the target document, i had applied the below command but its not working can anyone review this...
Below highlighted is inserted in the above code if anything wrong please rectify..
.Text = Split(Tbl.Cell(r, 2).Range.Text, vbCr)(0)
.Replacement.Text = Split(Tbl.Cell(r, 3).Range.Text, vbCr)(0)
.SortOrder=wdSortOrderDescending
.Execute Replace:=wdReplaceAll
For Reference :
2 Smart Ways to Sort a Column of Texts by Length in Your Word - Data Recovery Blog