Bug 165245 - MAILMERGE: Custom number format lost in fields of merge document
Summary: MAILMERGE: Custom number format lost in fields of merge document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge Fields
  Show dependency treegraph
 
Reported: 2025-02-13 22:44 UTC by JF
Modified: 2025-10-27 20:04 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
In the ZIP file, two files: Calc spreadsheet as the source and Writer documents use for the MailMerge (30.18 KB, application/x-zip-compressed)
2025-02-13 22:44 UTC, JF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JF 2025-02-13 22:44:23 UTC
Created attachment 199195 [details]
In the ZIP file, two files: Calc spreadsheet as the source and Writer documents use for the MailMerge

I am using a spreadsheet as a source database in a mailmerge document.

In the spreadsheet, I have a column "Phone_Number". The phone_number column in the spreadsheet uses the following user-define format “(000") "000"-"0000” so that the 10-digit phone number 2015555252 in the cell is displayed as (201) 555-5252.

In the spreadsheet, the user-define format works correctly and display the phone number correctly, i.e. with the surrounding brackets for the area code, followed by a space, and it includes the hyphen before the last 4 digits.

I also have a column "Price" formatted as currency in the spreadsheet $1 000 000 in the source spreadsheet.

In the merge document, I use both field. The "Price" is formatted correctly, but the phone number format seems to be lost, since it is shown as ten straight number 2015555252 and not (201) 555-5252.

I have attached a simple Calc and Writer document to replicate the bug.

Hope you can help.

JF

By the way, if I apply a custom format directly to the variable in the Writer document, it works. Also, I think I use to be able to define a format by right-clicking the field in the Database browser while editing the Writer document. Is it normal that this feature does not seam to be available anymore?
Comment 1 Buovjaga 2025-10-27 20:04:33 UTC
(In reply to JF from comment #0)
> By the way, if I apply a custom format directly to the variable in the
> Writer document, it works. Also, I think I use to be able to define a format
> by right-clicking the field in the Database browser while editing the Writer
> document. Is it normal that this feature does not seam to be available
> anymore?

Do you remember when this was possible via right-clicking? It is difficult to test with the example file as it seems file linking has changed over the years in the file format. The earliest I could test is 5.2 on Windows and that version was released in 2016. It does not have such functionality accessible by right-clicking.

The missing phone number formatting I confirm in the 5.2 version even after updating all fields, so I guess the feature to support custom number formats from linked Calc files has always been missing.