Closed Thread
Results 1 to 9 of 9

Batch convert .docx to .txt

  1. #1
    Forum Contributor
    Join Date
    06-24-2009
    Location
    Germany, MG
    MS-Off Ver
    Excel 2010
    Posts
    131

    Batch convert .docx to .txt

    Hi folks,

    i have roughly 650 .docx files that I would like to convert to .txt files. These files are sorted in different folders. If possible I want to keep this folder structure.
    Is there a way to do this easily?

    Thanks a lot in advance and
    kind regards
    Last edited by Cunner; 05-01-2013 at 04:16 AM.

  2. #2
    Forum Guru macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,646

    Re: Batch convert .docx to .txt

    You can use a macro for this:
    Please Login or Register  to view this content.
    For installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm

    Note that your original files will remain, intact.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    06-24-2009
    Location
    Germany, MG
    MS-Off Ver
    Excel 2010
    Posts
    131

    Re: Batch convert .docx to .txt

    I am amazed by what you (and all the other guys here) can do.
    Thanks a lot for your support, this is just awesome!

  4. #4
    Registered User
    Join Date
    06-15-2020
    Location
    Vienna, Austria
    MS-Off Ver
    2016
    Posts
    1

    Re: Batch convert .docx to .txt

    Hi folks!

    Sorry for grabing out this very old post.

    First: Thank you for this macro!

    But I have one question/issue: everytime I execute this macro, Word asks me to choose a directory to save the txt-file. I just want to save it in the same directory. If I have to choose the save-directory everytime it won't make my work easier :/

    Thank you for your hints

    Stephan

  5. #5
    Forum Guru macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,646

    Re: Batch convert .docx to .txt

    Quote Originally Posted by TheHayek View Post
    everytime I execute this macro, Word asks me to choose a directory to save the txt-file. I just want to save it in the same directory
    That is not what the macro does - at all. It asks the user to choose the top-level folder to process before saving all files in that folder and its sub-folders to their respective folders as text files without user intervention.

  6. #6
    Forum Guru macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,646

    Re: Batch convert .docx to .txt

    Cross-posted at: https://stackoverflow.com/questions/...s-to-txt-files

    Please read Excel Forum's Cross-Posting policy in rule 8: http://www.excelforum.com/forum-rule...rum-rules.html

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    51,911

    Re: Batch convert .docx to .txt

    Quote Originally Posted by TheHayek View Post
    Hi folks!

    Sorry for grabing out this very old post.

    First: Thank you for this macro!

    But I have one question/issue: everytime I execute this macro, Word asks me to choose a directory to save the txt-file. I just want to save it in the same directory. If I have to choose the save-directory everytime it won't make my work easier :/

    Thank you for your hints

    Stephan
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Registered User
    Join Date
    10-21-2021
    Location
    US
    MS-Off Ver
    Office 2010
    Posts
    1

    Re: Batch convert .docx to .txt

    Your macro has three different "Sub-to-EndSub" blocks,
    followed by a "Function-to-EndFunction" block.
    How should someone install those?
    Everything, into a single macro?
    Or, each "Sub-to-EndSub" block into a single macro? And, if so, what about the "Function-to-EndFunction" block?
    I'm asking, because I got an error code, when I tried to install everything into a single macro.

    *******
    BTW, I have Office 2010 on my main computer, and Office 2019 on a laptop.
    I can easily take my .docx files to the laptop, on a thumb drive, and do it there.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    60,651

    Re: Batch convert .docx to .txt

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

Closed 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1