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

Keyboard macros or custom scripts

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

Postby Bidouille » Fri May 19, 2017 3:51 pm

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   Expand viewCollapse view
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 499 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.
Last edited by Bidouille on Mon Jul 17, 2017 11:55 am, edited 1 time in total.
User avatar
Bidouille
Volunteer
 
Posts: 198
Joined: Mon Nov 19, 2007 10:58 am
Location: France

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

Postby UnklDonald418 » Sat May 20, 2017 5:47 am

I can confirm that the code fails on my Windows 10 system just as you described.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the subject line
Apache OpenOffice 4.1.3 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 536
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

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

Postby Bidouille » Mon Jul 17, 2017 11:55 am

Thanks for this feedback
Open an issue: https://bz.apache.org/ooo/show_bug.cgi?id=127421
User avatar
Bidouille
Volunteer
 
Posts: 198
Joined: Mon Nov 19, 2007 10:58 am
Location: France


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 5 guests