Bug 108459 - Filesave: "File name without Extension" and "Path" Fields saved as DOC open as "File name" in LO while "Path/file name" isn't shown at all in MSO
Summary: Filesave: "File name without Extension" and "Path" Fields saved as DOC open a...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
Depends on:
Blocks: DOC-Fields
  Show dependency treegraph
 
Reported: 2017-06-11 09:03 UTC by David
Modified: 2021-04-06 09:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
This is DOC with wrong PDF extension. (10.50 KB, application/pdf)
2018-01-02 19:32 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2017-06-11 09:03:20 UTC
Problem occurs in files saved in *.doc format, Windows 64 bit. 
Other file formats and OS not tested. 
Has been present for a while including up to at least Writer Version: 5.2.6.2 (x64) 
Is easily fixed by double clicking the field and re-selecting "File name without Extension" which works until the file is closed and re-opened - whereupon the problem reliably recurs.
Comment 1 Buovjaga 2017-06-12 11:20:31 UTC Comment hidden (obsolete)
Comment 2 QA Administrators 2018-01-02 10:14:27 UTC Comment hidden (obsolete)
Comment 3 David 2018-01-02 19:32:39 UTC Comment hidden (obsolete)
Comment 4 Timur 2018-01-03 16:02:26 UTC Comment hidden (obsolete)
Comment 5 David 2018-01-03 20:20:53 UTC
Steps to reproduce: 
1. Open / Write file in writer 
2. Save file in *.doc format e.g. as exempler.doc, Using Type Microsoft Word 97-2003(.doc)(*.doc) 
3. Enter in file anywhere "Insert | Field | More Fields | 
Type: "File Name" 
Format: "File Name Without Extension" (Changed from "File Name")
Fixed Content: Unchecked.
"OK"
Note file name displays as "exempler"
4. Save File.
5. Close file.
6. Open File exempler.doc in Writer 
7. Experienced: Note filename now showing as "exempler.doc" (The problem)
7. Expected: File Name to display as "exempler" i.e. without the extension coming back.
 

Re-expressed the Format: "File Name Without Extension" fails to save in this format, rather it saves as Format: "File Name"

<PS Contents in uploaded file:>
2018-01-03 Newly Created File To Demonstrate Writer Bug.doc

To demonstrate bug Double click on above file name, change Format to “File name without extension”, save file, close file, re-open closed file. 

.doc extension will have returned.

Many thanks for checking this out.



Reference:
Version: 5.2.6.2 (x64)
Build ID: a3100ed2409ebf1c212f5048fbe377c281438fdc
CPU Threads: 8; OS Version: Windows 6.1; UI Render: default; 
Locale: en-NZ (en_NZ); Calc: group

Bug known to exist for a long time in other versions as well.
</PS Contents in uploaded file:>
Comment 6 Timur 2018-01-04 09:42:10 UTC
Messy. We are speaking here about LO created file with fileds: file name, file name without extension, path, path/file name. You then need to use diff. LO versions to save as DOC and DOCX and then reopen respectfully in LO and MSO. And look all fields since each behavior is different. 

"File name without Extension" Field saved as DOC opens with file extension in LO. "Path" also opens wrong (as "File name"). "File name" and "Path/file name" open fine. 
If same fields are open in MSO, then "File name without Extension", "File name", "Path" are correct while "Path/file name" isn't shown at all in MS Office. 
So, I'd conclude that 3 fields need to be fixed for DOC export:"File name without Extension", "Path" and "Path/file name". That could be 3 bugs but I'd prefer to have one bug for export of those fields to DOC. It's easy to separate later should any be fixed in the meantime. 
OO doesn't show this field properly so I put earliest version LO 3.3. 

"File name" and "path/file name" saved by LO in DOCX open fine with LO while  "file name without extension" and "path" don't. All those fields from that LO created DOCX open fine in MSO. DOCX filter could be another bug. 

MSO doesn't seem to have "File name without Extension" Field at all, just "File name". https://support.office.com/en-us/article/Add-the-file-name-date-author-or-other-document-properties-to-a-header-or-footer-DC62245F-B6AF-45B2-A521-17753FC3539E
That doesn't mean DOC or DOCX don't support them, they can be shown. 
Also, looks like LO created fields are older file version. If saved again as DOCX in MSO 2013 then LO can't read any of those fields. Could be another bug.
Comment 7 QA Administrators 2019-01-11 03:54:35 UTC Comment hidden (obsolete)
Comment 8 David 2019-01-13 07:28:13 UTC
As requested re-tested - bug confirmed to continue unchanged (as expected as no one seems to have suggested an attempt to fix has occurred)
Downloaded and tested with:
Version: 6.0.7.3 (x64)
Build ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU threads: 2; OS: Windows 6.1; UI render: default; 
Locale: en-NZ (en_NZ); Calc: group
Comment 9 Justin L 2021-04-06 09:42:17 UTC
It looks like this is a case of MS Formats supporting less options than LO (as Timur noted.)

When opening in Word, make sure you UPDATE the fields.  (Ctrl-A, F9). Then you see that it only supports two options - filename.ext and path/filename.ext.

[Note that Word 2003 displays the DOC path/filename.ext just fine. However, Word 2016 only showed the field definition "-FILENAME \p"]