+ Reply to Thread
Results 1 to 4 of 4

Open wordpad/notepad/*.txt files via VBA Macro&Search for a keyword and Process the files

  1. #1
    Registered User
    Join Date
    08-19-2008
    Location
    India
    Posts
    28

    Open wordpad/notepad/*.txt files via VBA Macro&Search for a keyword and Process the files

    Dear All,

    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.
    Macro-notepad++-open.xls
    test1.zip

    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,

    Kind regards,
    reachspk123
    (Note: Please do not use Excel cell reference formulae anywhere in the sheet. I request you to perform calculations using VB macros only.)
    Last edited by reachspk123; 04-09-2012 at 03:47 PM. Reason: Changed the title for better understanding of the algorithm

  2. #2
    Registered User
    Join Date
    08-19-2008
    Location
    India
    Posts
    28

    Re: Open notepad++ files via VBA Macro & Search for a keyword and Process the files

    Dear All,

    Please find attached, <<test1.zip>> again with all compatible files, for your reference.
    test1.zip

    Could someone please work on the VBA macro based on the algorithm mentioned above?

    thanks in advance,
    reachspk123

  3. #3
    Forum Guru davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    XL 2003,2010,2013
    Posts
    7,545

    Re: Open notepad++ files via VBA Macro & Search for a keyword and Process the files

    Sorry, I do not have Notepad++, and have never had a reason to use it.
    Is there not a notepad++ forum?
    Maybe a Q&A from the place you acquired it from?
    Last edited by davesexcel; 04-07-2012 at 10:24 PM.

  4. #4
    Registered User
    Join Date
    08-19-2008
    Location
    India
    Posts
    28

    Re: Open notepad++ files via VBA Macro & Search for a keyword and Process the files

    Thanks for your message. For your kind information that notepad++ is similar to wordpad and they are both freeware word-processors. And I opened this thread to know or study the interface between excel and other applications (word processor, etc.,). If someone could help me out in giving the excel interface with Wordpad satisfying the above algorithm, it would be really helpful..

    thanks in advance!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts