Page 1 of 1

[Issue][Writer] Mailmerge can't save to Win Lib directories

Posted: Fri May 19, 2017 3:51 pm
by Bidouille
Hi all,
Steps to reproduce:
1) Create a new document
2) With F4 datasource, drag and drop some Bibliography fields
3) Save your document
4) Execute this code:

Code: Select all

Sub MergeMe
    sSource = "Bibliography"
    sTable = "biblio"
    sPrefix = "Identifier"
    sDoc = ThisComponent.URL
rem    sOut = ConvertToURL( Environ("USERPROFILE") & "\Documents")
    sOut = ConvertToURL( Environ("PUBLIC"))

    oMM = createUnoService("com.sun.star.text.MailMerge")
    With oMM
        .DataSourceName = sSource
        .CommandType = com.sun.star.sdb.CommandType.TABLE
        .Command = sTable
        .OutputType = com.sun.star.text.MailMergeType.FILE
        .FileNameFromColumn = True
        .FilenamePrefix = sPrefix
        .SaveAsSingleFile = True
        .DocumentURL = sDoc
        .OutputURL = sOut
        .execute(Array())
        .dispose()
    End With
End Sub
oups.png
oups.png (7.17 KiB) Viewed 2444 times
Unable to save into Public directory: read-only error
Same thing with Libraries subdirectories: Documents, Pictures, etc

Seems to be buggy since Windows 7 and later

Before filing an issue, I would like to know if you can reproduce.

Re: [Writer] Mailmerge can't save to Win Lib directories

Posted: Sat May 20, 2017 5:47 am
by UnklDonald418
I can confirm that the code fails on my Windows 10 system just as you described.

Re: [Writer] Mailmerge can't save to Win Lib directories

Posted: Mon Jul 17, 2017 11:55 am
by Bidouille
Thanks for this feedback
Open an issue: https://bz.apache.org/ooo/show_bug.cgi?id=127421