Bug 131527 - FILESAVE DOCX Mail merge field name with starting or ending space saved incorrectly
Summary: FILESAVE DOCX Mail merge field name with starting or ending space saved incor...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, implementationError
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2020-03-24 11:27 UTC by NISZ LibreOffice Team
Modified: 2024-10-21 03:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (8.53 KB, application/vnd.oasis.opendocument.text)
2020-03-24 11:27 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer to docx (4.43 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-24 11:29 UTC, NISZ LibreOffice Team
Details
The docx export fixed up by Word 2013 (12.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-24 11:30 UTC, NISZ LibreOffice Team
Details
Test data source (8.77 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-03-24 11:30 UTC, NISZ LibreOffice Team
Details
Screenshot of the example docx opened in Word – Field with starting space not found (27.44 KB, image/png)
2020-03-24 11:31 UTC, NISZ LibreOffice Team
Details
Screenshot of the example docx opened in Word – Field with ending space not found (28.47 KB, image/png)
2020-03-24 11:31 UTC, NISZ LibreOffice Team
Details
Example file from Writer - with more characters (10.66 KB, application/vnd.oasis.opendocument.text)
2020-03-27 12:46 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer to docx (4.56 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-27 12:47 UTC, NISZ LibreOffice Team
Details
The docx export fixed up by Word 2013 (13.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-27 12:49 UTC, NISZ LibreOffice Team
Details
Screenshot of the updated file in Word (41.93 KB, image/png)
2020-03-27 12:52 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-03-24 11:27:45 UTC
Created attachment 158919 [details]
Example file from Writer

If a mail merge field name contains a space at the start or end in the data source, inserting in a Writer document results in an incorrect field name that Word can not find in the same data source.
If the field name contains no starting or ending space, Word can find it in the same data source. Upon saving it ignores the starting space and replaces the ending one with an underscore.

Steps to reproduce:
1.	Open attached example document in Writer and save it in DOCX format
2.	Open the document in Word
3.	Choose Mailings – Select Recipients – Use an existing list
4.	Browse the attached data source XLSX
5.	Click Preview Results button in the Mailings ribbon

Actual results:
A dialog pops up that says the Firstname and Lastname fields cannot be found in the data source, asks to choose existing fields.

Expected results:
Data fields are found when Preview Results is selected.

LibreOffice details:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: ec85ed21a960a198a01778cdb89a91fabcb5d0c0
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: en-US (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-03-24 11:29:48 UTC
Created attachment 158920 [details]
The original file saved by Writer to docx
Comment 2 NISZ LibreOffice Team 2020-03-24 11:30:06 UTC
Created attachment 158921 [details]
The docx export fixed up by Word 2013
Comment 3 NISZ LibreOffice Team 2020-03-24 11:30:43 UTC
Created attachment 158922 [details]
Test data source
Comment 4 NISZ LibreOffice Team 2020-03-24 11:31:03 UTC
Created attachment 158923 [details]
Screenshot of the example docx opened in Word – Field with starting space not found
Comment 5 NISZ LibreOffice Team 2020-03-24 11:31:19 UTC
Created attachment 158924 [details]
Screenshot of the example docx opened in Word – Field with ending space not found
Comment 6 NISZ LibreOffice Team 2020-03-27 12:46:49 UTC
Created attachment 159066 [details]
Example file from Writer - with more characters

Also found that slash and dot are problematic. Replacement field names - if they are the same - are autonumbered.
Comment 7 NISZ LibreOffice Team 2020-03-27 12:47:32 UTC
Created attachment 159067 [details]
The original file saved by Writer to docx
Comment 8 NISZ LibreOffice Team 2020-03-27 12:49:38 UTC
Created attachment 159068 [details]
The docx export fixed up by Word 2013
Comment 9 NISZ LibreOffice Team 2020-03-27 12:52:34 UTC
Created attachment 159069 [details]
Screenshot of the updated file in Word
Comment 10 Dieter 2020-10-18 06:38:34 UTC
I confirm it with

Version: 7.0.2.2 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: he-IL (de_DE); UI: en-GB
Calc: threaded
Comment 11 QA Administrators 2022-10-19 03:33:43 UTC Comment hidden (obsolete)
Comment 12 Dieter 2022-10-21 20:51:23 UTC
Still present in

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 13 QA Administrators 2024-10-21 03:15:38 UTC
Dear NISZ LibreOffice Team,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug