Share via

notepad file conversion

rudy dickens 0 Reputation points
2025-10-19T05:34:13.4933333+00:00

What is the easiest way to convert a bunch of notepad text files to Word 2019 MSO?

Microsoft 365 and Office | Word | Other | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Thomas4-N 17,710 Reputation points Microsoft External Staff Moderator
    2025-10-19T10:12:14.3766667+00:00

    Hello rudy dickens, welcome to Microsoft Q&A Forum.

    The easiest way depends on how many files you need to convert.

    If you only have a few files:

    Open a .txt file directly in Word 2019 by right-click the file and choose Open with > Word. After it opens in Word, go to File > Save As and select Word Document (.docx).

    This is quick and works well for small numbers of files.

    If you have a lot of files:

    You can automate the process with a VBA macro in Word. Here’s an example:

    • Open Word and press Alt + F11 to open the VBA editor.
    • Go to Insert > Module and paste this code:
    Sub ConvertTxtToDocx()
        Dim strFolder As String
        Dim strFile As String
        Dim wdDoc As Document
        
        ' Change this to your folder path
        strFolder = "path"
        
        strFile = Dir(strFolder & "*.txt")
        
        While strFile <> ""
            Set wdDoc = Documents.Open(FileName:=strFolder & strFile)
            wdDoc.SaveAs2 FileName:=strFolder & Replace(strFile, ".txt", ".docx"), FileFormat:=wdFormatXMLDocument
            wdDoc.Close
            strFile = Dir
        Wend
        
        MsgBox "Conversion complete!"
    End Sub
    ``
    
    • Replace path with the folder path where your text files are stored. For example: C:\Users\YourUserName\Desktop\TxtFiles
    • Run the macro (press F5 in the VBA editor).

    This will convert all .txt files in that folder to .docx.

    I hope this helps! Let me know if you have any further questions.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    Was this answer helpful?

    1 person found this answer helpful.

  2. Piyush Rana 385 Reputation points
    2025-10-19T12:19:37.4933333+00:00

    If you want to convert multiple Notepad files at once, you would need to use a batch script or third-party tool. Word does not provide a built-in option for bulk conversion from text to Word documents.

    Or,

    Open each Notepad file in Word and save it as a Word document. As there is no built-in batch conversion, so you will need to do this for each file separately.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.