Community
    • Login

    Notepad++ corrupts Word files after successfully finding/replacing text string

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 5 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • willthatcherW
      willthatcher
      last edited by

      Title says it all. After performing and replacing a string text in multiple files within the same directory, all of the files are corrupted and unable to open. I have attempted this four separate occasions. I am working on a Windows 7 machine with Word 2016. I do see in the open dialogue box that it found and replaced the text I am searching on, however not able to open the file after running Notepad++.

      1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by

        @willthatcher ,

        If by “Word files” you mean Microsoft Word documents, like .docx or .doc: they are a proprietary word processing binary format, and not a plain-text file. Notepad++ is a plaintext editor. There may be some visible words among the binary gobbledygook if you look at a .docx/.doc in Notepad++… but by changing the plaintext portions, you are likely changing string lengths, and binary formats don’t like it when you arbitrarily change string lengths.

        See more at https://notepad-plus-plus.org/community/topic/16178/faq-desk-why-does-my-docx-file-look-like-junk-in-notepad

        1 Reply Last reply Reply Quote 4
        • willthatcherW
          willthatcher
          last edited by

          Yes, that is the issue, working in MS Word.

          1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn
            last edited by

            I always love the “title says it all” thing. Because no it doesn’t. If it did, the title would have been “Here comes another silly posting about someone attempting to edit non-text files with a text editor, and the person is totally clueless about why they are having problems doing this”. Ok, that title may be a bit longish…

            The second posting by the OP extends the cluelessness.

            1 Reply Last reply Reply Quote 1
            • PeterJonesP
              PeterJones
              last edited by PeterJones

              I wasn’t sure, given @willthatcher’s reply of

              Yes, that is the issue, working in MS Word.

              … whether that meant “oh, I understand now, IO shouldn’t be using Notepad++, a plain text editor, to edit the binary-encoded text in a word-processor document like a MS Word .doc/.docx”; or whether that meant, “yes, you have described my problem; I want to be able to edit a word document in Notepad++, and have completely ignored the link where you described why I cannot”.

              I gave the OP the benefit of the doubt, chosing to interpret it as the first, in which case nothing further was needed from me.

              1 Reply Last reply Reply Quote 3
              • Jim DaileyJ
                Jim Dailey
                last edited by

                @willthatcher The simple answer is that you need to use Word if you are going to make changes to Word documents. The not so simple answer is not so simple, so I’ll omit it. :-)

                Meta ChuhM 1 Reply Last reply Reply Quote 4
                • Meta ChuhM
                  Meta Chuh moderator @Jim Dailey
                  last edited by

                  @Jim-Dailey

                  you’ve just made my day, with style ;-)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors