I need a MS Word Macro working with 2013 version onward with following function. There are many versions of one file with (.doc/.docx) extension named like 100, 100m, 100m2, 100m3 etc (max upto m5). These files are stored in different sub directories within main folder Articles. I open the file Articles/new/100m3 (latest file) and want to compare with Articles/old/100m2 (previous version) using compare feature in Word.
After opening file 100m3 I will run macro and it should search under Articles folder finding previous version. Then show the compare result of file 100m2 (original document) with 100m3 (revised document) in Word. The previous version file name can be found with following logic.
1) Search the Articles folder only with keyword 100 and find list of .doc/.docx files. 2) Make an array of file name, file path and file modification time. 3) Sort the array based on file modification time from recent to earlier. 4) Compare the opened file (i.e. first array element) with the file in second array element. 5) If no previous version found then show message "No previous version available".
The macro should be in code format that i can insert by clicking Macro edit function in Word. You should mention comments within macro explaining how it works. Please reply if you can help. Thank you.
Do not close or refresh the page, until you have got a SMS with OTP
You will get a SMS within 60 seconds on below number