[Solved] MS Word files retaining their blood line?

Using them, Making them, Finding them
Post Reply
ampj_dad
Posts: 4
Joined: Wed Aug 24, 2011 5:38 pm

[Solved] MS Word files retaining their blood line?

Post by ampj_dad »

Scenario:
1 - Word file emailed to me. (iMac user, OSX Lion)
2 - Opened the Word file with OpenOffice
3 - Made changes and saved document as ***.odt (I'm thinking I now have a OpenOffice document)
4 - Sent .odt document back to author as attachment to email
5 - My Mac Mail client shows the item with an .odt extension and an OpenOffice icon.
6 - Using Gmail, author/recipient sees the attachment with a Word icon but an .odt extension. Weird thing #1
7 - I log onto my Gmail account directly to see what was sent. Sure enough, my Sent mail shows the Word icon and the .odt extension. Weird thing #2

Problem: Is there a way to open a Word file and save it so it is officially "transformed" to an OpenOffice document? Somehow Gmail interpreted an email attachment with an .odt extension as a Word doc and hung a Word icon on it. (which, of course, it was originally but it was Saved as an .odt document). There must be something else GMail references other than the extension.

Minor Problem: Apple's Mail client displayed [correctly, or at least as expected] an OpenOffice icon for the .odt file attached to the email. Underneath, Gmail hung a Word icon on that attachment. So the two are out of sync, initially leading me to believe the error was on the receiving end.
OpenOffice 3.3.0 with OSX Lion
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: MS Word files retaining their bloodline??

Post by TheGurkha »

The icon used to display a file isn't 'in' the file itself. The icon that is displayed for a file depends on how the OS interprets that file extension.

On a PC with OOo on it, the OS knows the file type belongs to OOo and so it uses the OOo icon as the file icon.
On a PC without OOo on it, the OS uses the icon of whatever application says it can handle files of that type. In this case, the recipients computer doesn't have OOo, but it does have Word so it gives it a Word icon.

If you need to send a document to someone who is going to edit it in Word, do this: File > Save As and select 'Microsoft Word 97/2000/XP' from the 'Save as type' drop down menu. Make sure the 'Automatic file name extension' option is checked. Then it is a Word file.

Or, get them to install OOo and use .odt.

It is always safer to work in the native OOo formats (.odt and .ods etc) and then use Save As to save a copy in .doc or .xls format if you need to distribute it in MS Office formats. But always then go back to the native OOo version to continue working. If the people you are sending to do not need to edit the files then it is best to send them a PDF as then no matter what office suite they use it will be possible for them to read and print the files.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
ampj_dad
Posts: 4
Joined: Wed Aug 24, 2011 5:38 pm

Re: MS Word files retaining their blood line?

Post by ampj_dad »

Thanks for the quick reply. A few items of clarification -- The file came to me from a Windows PC that does NOT have Word, only OpenOffice; therefore his OS must understand the the .doc extension and provide the Word icon or the icon is simply "carried" along with the file when forwarded by email. He received the Word.doc from someone who DOES have Word installed.

My Mac has OpenOffice and Word installed. But we are getting ahead of ourselves. Before the recipient ever saw the file, it was in my Sent box in GMail first. And my copy of the email clearly has the Word icon on a file with an .odt extension. Where did that icon come from? Apple Mail shows the attachment with an OpenOffice icon and the .odt extension. All is well. But when I look at the Gmail account Apple Mail is fronting, the Word icon is there. What gives? We're not anywhere near the recipient yet so their OS cannot be involved.
OpenOffice 3.3.0 with OSX Lion
ampj_dad
Posts: 4
Joined: Wed Aug 24, 2011 5:38 pm

Re: MS Word files retaining their blood line?

Post by ampj_dad »

More fuel on the fire - it appears something is up with Gmail. I just created a file from scratch in OpenOffice and saved it off as such with the .odt extension. From Gmail, I sent the file to myself. It arrived in my inbox with a Word icon. Same for the Sent file; it has a Word icon as well.

Composed another message at yahoo mail and attached the ,odt file. Yahoo assigned an icon with a paperclip over a page with a corner folded down - looks sort of generic. It arrived in my gmail inbox with the Word icon. Yahoo Sent mail file shows the generic icon, not a word icon. Sent a Word.doc to gmail from Yahoo. Shows up in Gmail just like the .odt files, same Word icon.

Sent a message to yahoo from another yahoo account with a .odt extension. Shows up in Yahoo inbox with that generic icon, clearly not a Word.doc file or icon. That would seem to narrow things down to Gmail....
OpenOffice 3.3.0 with OSX Lion
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: MS Word files retaining their blood line?

Post by TheGurkha »

I would only concern yourself with the icon of the file once it is detached from the email and on the computer. When it is still attached to the email (especially a cloud based email) it is often not the OS that determines the icon.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: MS Word files retaining their blood line?

Post by Villeroy »

A data file does not any application icon with it. An office document carries a tiny screenshot of its first page serving as a preview icon for whatever application may be concerned.
You can have a dozend of different ODF applications on your machine. Your desktop environment displays whatever icon has been configured to be displayed for this particular file type. Normally this is the icon of the same program which is triggered by a double-click on the respective file (the "default application" for this file type).
3 - Made changes and saved document as ***.odt (I'm thinking I now have a OpenOffice document)
You save a WinWord document (*.doc) as ODF text document (*.odt) by selecting the right file type from a list box in the save-as dialog. The right file type is "ODF Text Document (*.odt)". Make sure that you have option "automatic extesion" checked or add the .odt suffix manually.
It is possible that you saved or renamed your file with a wrong file name suffix. The file name suffix will not change a single byte of your file but it might change the displayed icon and it may trigger the wrong application on double-click. But there are means to open any file with any other application independently from suffix and icon.
Whatever piece of software is responsible for the displayed icon (the local mail client, gmail web-app, desktop environment), the icon is only a guess about the actual file content. Some web-application may identify an ODF document as zip archive simply because it is one as you will see when you open any ODF document in a zip tool.

At its best the icon indicates the application to be lauched when you double-click on it. The icon may indicate something wrong.

Under Linux there is a command line tool called "file":

Code: Select all

$ file mySpreadsheet.xyz
mySpreadsheet.xyz: OpenDocument Spreadsheet
It analyses the file type pretty reliably regardless of the file name suffix.

Code: Select all

$ file myWinWord.abc
myWinWord.abc: CDF V2 Document, Little Endian, Os: Windows, Version 4.10, Code page: 1252, Title: Vertrag, Author: Andreas Siger, Template: Normal.dot, Last Saved By: Andreas Stger, Revision Number: 12, Name of Creating Application: Microsoft Word 8.0, Last Printed: Wed May 26 23:00:00 2004, Create Time/Date: Sun May 30 17:21:00 2004, Last Saved Time/Date: Sun Jun  6 21:27:00 2004, Number of Pages: 1, Number of Words: 3002, Number of Characters: 17117, Security: 0
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
ampj_dad
Posts: 4
Joined: Wed Aug 24, 2011 5:38 pm

Re: MS Word files retaining their blood line?

Post by ampj_dad »

Thanks for the detailed response. The code is a bit beyond my level though I understand your written comments.

Bottom line: Gmail doesn't handle the icons correctly, leading to possible confusion (As in, "is this a Word doc or a OOffice doc?). Fortunately, as you note, the [gmail delivered] file is processed correctly by your OS when the file is saved and the correct icon assigned. For the record, Yahoo, for one, handles the icons correctly, assigning different and appropriate icons to .odt and .doc files. When viewing a .odt attachment on a Yahoo email, there is clearly no MS Word icon in sight. On Google there is a MS Word icon. It's as plain as that.
OpenOffice 3.3.0 with OSX Lion
thomasjk
Volunteer
Posts: 4451
Joined: Tue Dec 25, 2007 4:52 pm
Location: North Carolina

Re: MS Word files retaining their blood line? [Solved]

Post by thomasjk »

Yes. Gmail does display the wrong icon. I just tested this.
Tom K.
Windows 10 Home version 1803 17134.165
LibreOffice 5.4.7.2
Post Reply