none
open,copy all and paste in a word file RRS feed

  • Question

  • Every month I have to cosolidate the log files created throughout the month into one word file.

    My log files are created in notepad as text.Normally ,I open each notepasd file ,copy all contents and paste in a blank word file (append subsequent text files).Since, there are atleast 50 files for consolidation I have to automate the process.

    What I need is, i want a macro in a word file that will consolidate  all text files (that are to be consolidated)kept  in a folder and save it as a word file the name of which will be specified by me  in the macro itself.

    Can anybody help?


    ஜெ.இரவிச்சந்திரன்

    Monday, January 14, 2013 5:28 PM

Answers

  • Which version of Word are you using?

    Could you please check whether Word's "Insert file" command brings the text into Word in an acceptable manner? This will be much better than using copy/paste if it will do the job.

    If that works for you, even if you need to take some actions, such as pressing Enter once or twice after inserting, try recording those steps and saving in a macro. The copy/paste the macro into a reply and we can adjust it to loop through a folder.


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, January 14, 2013 9:45 PM
    Moderator