Used OpenOffice to save as .doc and then...

Discuss the word processor
Post Reply
yeehaw12345
Posts: 3
Joined: Sun Feb 25, 2018 1:26 am

Used OpenOffice to save as .doc and then...

Post by yeehaw12345 »

... when opening in any desktop version of Word, the last few words -- after "will be admitted into court and" -- disappear.

But, when opening the same .doc with Openoffice, all of the last few words appear.

I also noticed that the word and character counts when opening in OO and Word are slightly "off" by a few digits, and do not account for, exactly, the "missing words."

Otherwise, all of the text appears to be there.

I also tried opening the .doc in LibreOffice (all words appear) and Word Online (all words appear, oddly enough).

What gives?

.doc is attached.

I know, now, that I should have saved in .odt format but I already took and submitted this test as a .doc and am freaking out that the last sentence was incomplete.

Any help would be much, much appreciated, thank you!!

Sincerely,

Freaking Out
Attachments
evidence.doc
(27 KiB) Downloaded 258 times
OpenOffice 4.1.5 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Used OpenOffice to save as .doc and then...

Post by RoryOF »

Displayed OK for me on a pre-release version of OpenOffice. My suggestion would be to pad the file with a few blank lines at the end, just in case the end data is dropped off, although I didn't see that, as I said.
 Edit: Also displayed completely with AbiWord. 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Used OpenOffice to save as .doc and then...

Post by John_Ha »

That is extremely strange. Recapping, the last words are "... will be admitted into court and he could be tried for robbing the bank." where the words in red (he could be tried for robbing the bank.) are not present when opened in MS Word.

When I open the .doc file with a Hex editor (HxD) the file is well formatted and I can see no reason for the last few words not to display in MS Word.

I cannot see any "hidden" structure which would prevent the text displaying but I do not know how .doc files store formatting information - it appears that a .doc file stores the "falt" text in one place, and stores the formatting to be applied to that text somewhere else. Has this link between the formatting to be applied and the text to which it refers somehow been broken?

You needed to check the file in MS Word - has the text been set to white? Can you highlight the missing text? Is it in a hidden section? Does a white graphic overlay it? What happens if you add a a new word like zebra at the end?
Clipboard01.gif
When I save it as a .odt it saves as I would expect and, again, there is no "hidden" structure which would prevent the text displaying - the file is just flat text.
Clipboard02.gif
It does suggest a problem with the MS Word installation.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
yeehaw12345
Posts: 3
Joined: Sun Feb 25, 2018 1:26 am

Re: Used OpenOffice to save as .doc and then...

Post by yeehaw12345 »

Rory and John, thank you so much for all of your help with this.

Especially you, John, for posting all of the screenshots, etc. Yes, you are correct that the issue here is someone seeing it opening with MS Word.

I also understand what you are saying about the possibility of the "white" or "missing" text and/or the breakdown between text and formatting.

Yes, it is very strange.

However, I think I figured it out... I have been playing around with the document (and others, too), and consistently, what happens is this:

When using OpenOffice and saving as a .doc, if you end a sentence without hitting return to go to a new line (that is to say, giving the document a "pad" of one line), the line (and only that line) which you ended on with the period will not show up in a .doc when opening with MS Word.

Rory really deserves credit for that one.

Try it...

Have you guys ever heard of anything like this?

Thank you so much again to you both!! You are one of a kind!!
OpenOffice 4.1.5 on Windows 10
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Used OpenOffice to save as .doc and then...

Post by Hagar Delest »

You mean that the file must end with a blank paragraph?
Can't check if it's reproducible right now but that would be weird if that was a general bug affecting the .doc export.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Used OpenOffice to save as .doc and then...

Post by John_Ha »

yeehaw12345 wrote:When
- using OpenOffice and
- saving as a .doc,
- if you end a sentence without hitting return to go to a new line ...
- the line (and only that line) which you ended on with the period will not show up in a .doc when opening with MS Word.
Try these test files where I pasted "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog." into an empty document such that "the lazy dog." appeared on the last line. I then saved it as a .doc (97), a .doc (95) and a .doc (6.0) respectively.
Attachments
test jh 6.doc
Word 6.0
(7 KiB) Downloaded 76 times
test jh 95.doc
Word 95
(7 KiB) Downloaded 84 times
test jh 97.doc
Word 97/2000/XP
(10 KiB) Downloaded 100 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Used OpenOffice to save as .doc and then...

Post by John_Ha »

Hagar Delest wrote:You mean that the file must end with a blank paragraph?
Can't check if it's reproducible right now but that would be weird if that was a general bug affecting the .doc export.
It's very strange. As you can see the .doc file contains the words which are not displayed when opened with MS Word so I have no idea what is happening! If it was an AOO "writing to a .doc file" bug it would surely have been reported countless times before - unless it is a regression with a recent version upgrade.

It is interesting that the Word 97/2000/XP file i posted above is 10 kB while the others are only 7kB so there is a considerable difference between the versions' files.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Used OpenOffice to save as .doc and then...

Post by RoryOF »

I haven't examined the various test files so what I write is speculation. I years ago did see a situation where a file ends with text, that line not terminated with a paragraph mark or a line feed. If the display engine is set to display only properly terminated lines (paragraphs) it would also need to check for End of File as well so that such an ill-terminated line would be displayed. Years ago - pre CP/M days if anyone remembers them, I did see such an error.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Used OpenOffice to save as .doc and then...

Post by Hagar Delest »

I just checked at work with MS Office and it works fine:
evidence.png
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
yeehaw12345
Posts: 3
Joined: Sun Feb 25, 2018 1:26 am

Re: Used OpenOffice to save as .doc and then...

Post by yeehaw12345 »

Thank you again, John, Rory and Hagar...

John, I downloaded each of your documents, and, sure enough, for the .doc 97 version, when opening in MS Word 2016, the last line was cut.

For the other .doc versions you provided, no lines were cut.

HOWEVER...

It seems that in all instances where there is at least one line of text above the "cut line," when opening in Word 2016, if you click around where the text should be, it actually comes up.

The one exception is when the "cut" line is a "standalone" line (ie one sentence without text above or below it) and still with no "pad line" under it, when exporting from AOO to .doc and opening in Word 2016, the line will not come up.

However, this was not the case, with respect to the standalone line, when I was playing around with the 97. doc that John provided -- here, when I opened this .doc with AOO 4.1.5 and then added a standalone line (without a pad line under it), and then exported to .doc and opened with Word 2016, I was able to click around where the standalone line was and it appeared... the same was true for when I simply copied and the text from John's provided 97 .doc, in AOO 4.1.5, and then pasted the text into another AOO 4.1.5 doc file (and then later exported to .doc and opened with Word 2016).

So there was something special about John's "formatting," so to speak.

In all instances, all of the "cut line" problems were avoided simply by adding a "pad line" below the "cut line."

And lastly, if you create a document in AOO (4.1.5, at least) with only *one* line and export to .doc and then open with Word, the one line will not show up, but you can still click around for it to appear.

I also tried most of the docs on Word Online and there were no problems with cut lines.

So there is something about a handful of desktop versions of Word that do something strange with reading .docs were it cuts a bottom line if there is no "pad" line... perhaps with how they interpret a document "ending."

Very strange.

I'm surprised this has not come up before.

I suppose it is what it is... worst case scenario is that I lose a line of text. It definitely could have been worse.

I thank you guys again for all of your help.

Any last thoughts?
OpenOffice 4.1.5 on Windows 10
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Used OpenOffice to save as .doc and then...

Post by Hagar Delest »

You can try to open a bug report so that the dev investigate. Add the file in attachment and/or put the link to this topic.
-> [Tutorial] Reporting bugs or suggestions.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Used OpenOffice to save as .doc and then...

Post by John_Ha »

yeehaw12345 wrote:John. I downloaded each of your documents, and, sure enough, for the .doc 97 version, when opening in MS Word 2016, the last line was cut.

For the other .doc versions you provided, no lines were cut.

HOWEVER...

It seems that in all instances where there is at least one line of text above the "cut line," when opening in Word 2016, if you click around where the text should be, it actually comes up.

The one exception is when the "cut" line is a "standalone" line (ie one sentence without text above or below it) and still with no "pad line" under it, when exporting from AOO to .doc and opening in Word 2016, the line will not come up.

However, this was not the case, with respect to the standalone line, when I was playing around with the 97. doc that John provided -- here, when I opened this .doc with AOO 4.1.5 and then added a standalone line (without a pad line under it), and then exported to .doc and opened with Word 2016, I was able to click around where the standalone line was and it appeared... the same was true for when I simply copied and the text from John's provided 97 .doc, in AOO 4.1.5, and then pasted the text into another AOO 4.1.5 doc file (and then later exported to .doc and opened with Word 2016).

So there was something special about John's "formatting," so to speak.

In all instances, all of the "cut line" problems were avoided simply by adding a "pad line" below the "cut line."

And lastly, if you create a document in AOO (4.1.5, at least) with only *one* line and export to .doc and then open with Word, the one line will not show up, but you can still click around for it to appear.

I also tried most of the docs on Word Online and there were no problems with cut lines.

So there is something about a handful of desktop versions of Word that do something strange with reading .docs were it cuts a bottom line if there is no "pad" line... perhaps with how they interpret a document "ending."

Very strange.

I'm surprised this has not come up before.

I suppose it is what it is... worst case scenario is that I lose a line of text. It definitely could have been worse.

I thank you guys again for all of your help.

Any last thoughts?
I still think it is a problem with your installation of MS Word and not with the file. I created the file with plain text with no formatting so it cannot be my formatting which causes the text to disappear - it must be your MS Word. Your file works OK in Hagar's MS Word.

Do some more tests

1. Start the PC in Safe Mode and look at the file. Does the text always appear?

2. If not, and still in Safe Mode, do you have any extensions installed? If so, disable or uninstall them.

3. In MS Word go Edit > Select All (it may be Ctrl+A). Now set it to Default text. Save. Does the text now always appear?

Google missing words in doc file to find posts like Part of Word 2007 document missing in Word 2013
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Used OpenOffice to save as .doc and then...

Post by Hagar Delest »

John_Ha wrote:Try these test files where I pasted "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog." into an empty document such that "the lazy dog." appeared on the last line. I then saved it as a .doc (97), a .doc (95) and a .doc (6.0) respectively.
I see the same on my MS Word 2010:
Test file.png
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Used OpenOffice to save as .doc and then...

Post by Villeroy »

Screenshot from the end of evidence.doc of 25 Feb 2018, 01:03 opened with Microsoft Word Viewer.
Evidence.png
The problem is that doc is not a technical standard. Something that is designed to work with one particular product is not a standard. It is a monopoly.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Used OpenOffice to save as .doc and then...

Post by John_Ha »

I am now 100% certain the problem is with the poster's MS Word installation.

Uninstall MS Word. Re-install it. Let us know if that fixes it.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
KuroOniyuri
Posts: 3
Joined: Tue Mar 13, 2018 6:15 pm

Re: Used OpenOffice to save as .doc and then...

Post by KuroOniyuri »

I have also had a similar experience with documents losing the last line. I don't know how much I can add to the conversation but here is what I personally noticed:
-it doesn't seem to happen every time but many of them
-adding blank lines at the end does keep the wanted text from disappearing in Word
-in my experiences, while in Word the missing text is NOT there at all; the page ends and there is no hidden or white text at the end of what you can see and the cursor will not move beyond the visible text.
-the text does not appear on any computer with Word (I am in college and have taken the same document to multiple computers with Word, granted they all had the same version, and it was still missing) but it does appear when I open it again with my computer and OpenOffice.
-adding the missing line back while still in Word, saving it, and then opening it with OpenOffice will result it the last line appearing twice, so it was somehow still there but yet not (if that makes sense)

I don't have any old documents or screenshots to add but the two files I have included were the most recent examples where the problem came up. In each of these my instructor could not see the last question's answers, but as I mentioned, when I download (not just reopen my saved file) then and open them with OO the last lines are there like they should be.
Attachments
Ch 6- What if.doc
Supposed to have 10 answers
(12.5 KiB) Downloaded 79 times
Ch 6- Review.doc
Supposed to have 14 answers
(13 KiB) Downloaded 74 times
OpenOffice 4.1.3 on Windows 10
Post Reply