Can someone please help me out in generating a macro to open the files (in notepad++.exe) associated with a particular statement and Find/search the keyword and process the opened files accordingly?
I have clearly mentioned the requirements in Excel sheet enclosed (Please refer cells A16:A30)
Algorithm: for your kind reference.
1. a) If the Command button "Open files in notepad++.exe" is clicked, it should open the "Master_file.dat" file in notepad++ session and search for the INCLUDE statements available inside the "Master_file.dat" file and open all files associated with the INCLUDE statements. (For your information Master.dat could be opened in notepad++.exe, which is a free software ; All files are available in folders A, B, C and the macro should be capable of searching 'n' number of subfolders inside the main 'test' folder)
b) All the files (in the INCLUDE statement) should be opened in a single Notepad++ session
2. a) If the Command button "Find keyword and keep the appropriate files" is clicked, macro should find a specified text (user enter via a GUI) in all files opened in Notepad++ session. i.e., In the dialog box, text or number to be found is entered. (Regular expressions can be used - eg. (1234l7890 means look for 1234 or 7890).
This macro should also close all files in Notepad++ session which doesn't have the specified text
Finally, please use the generic path as C:/test1/ to referance all files. Unzip the attached "test1.zip" and place in this location.
I tried developing a VB routine based on the algorithm. Macro written now is only capable of the following:
It opens the selected file (*.dat/*.asm/*.pch files) in notepad. But the file should be opened in notepad++ following the above algorithm
Also, it displays the GUI for the second macro (i.e when 'Find keyword*** command button is clicked)
Please modify the macro accordingly and Requesting you to please get me an Excel Macro for the .
Thanks in advance,
(Note: Please do not use Excel cell reference formulae anywhere in the sheet. I request you to perform calculations using VB macros only.)