Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 08-31-2021, 08:25 AM
ranjan ranjan is offline Merging of colums from two different docs & create a new doc Windows 10 Merging of colums from two different docs & create a new doc Office 2019
Advanced Beginner
Merging of colums from two different docs & create a new doc
 
Join Date: May 2021
Posts: 80
ranjan is on a distinguished road
Default

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

Last edited by ranjan; 08-31-2021 at 10:32 AM. Reason: Add: Sort by a length (large to small)
Reply With Quote
 

Tags
merging of colums



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging of colums from two different docs & create a new doc Merging Word docs / PDFs while keeping external links Daedalus Word 1 05-11-2015 07:37 AM
Merging of colums from two different docs & create a new doc Merging Various .docs Via Q&A Wants_It_Simple Word 1 06-30-2014 10:26 PM
Merging of colums from two different docs & create a new doc How to create shorter docs from large base template? Preloader Word 13 10-19-2013 09:39 PM
Fields/Colums in folders cilimpuli Outlook 1 03-10-2013 12:20 PM
Merging of colums from two different docs & create a new doc Is it possible to create 'balloon' text in docs bubbleboi Word 3 11-13-2009 01:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft