MailMerge shows error when validating arguments: Either the ResultSet or DataSourceName and DataCommand must be set https://github.com/LibreOffice/core/blob/master/sw/source/uibase/uno/unomailmerge.cxx#L606 But later in https://github.com/LibreOffice/core/blob/9b8013b20d20a3946146d5287e8d8f8b9ddf694d/sw/source/uibase/dbui/dbmgr.cxx#L469 it checks for aData.sDataSource.isEmpty() || aData.sCommand.isEmpty() || !xResSet.is() and silently fails.
Also I've tried to provide ActiveConnection instead of DataSourceName which allowed according to DataAccessDescriptor documentation but first check fails with it.
I've tested https://gerrit.libreoffice.org/c/core/+/91277 with only ResultSet assigned and object was accesed.
Oleg Shchelykalnov committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a039725510f13c77591106b02f32f5899c37c007 tdf#131618 MailMerge: Don't require DataSourceName if ResultSet provided It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Could it be backported to 6.4?
Oleg, if this bug is fixed, then please close it as RESOLVED FIXED, thanks
Oleg Shchelykalnov committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/06789981b0ed4485f695ad87b332a1b6c3230365 tdf#131618 MailMerge: Don't require DataSourceName if ResultSet provided It will be available in 6.4.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.