Hello,
when I run a mailmerge writer macro I have to set the password for the database, otherwise i get an error. When I open a writer template that also access the database I get a dialog to enter the database password. Then the macro works.
But is there a way to store the password directly in the mailmerge macro or in the settings of libreoffice, so that i do not have to enter it every time again?
Macro:
DIM oMailMerge AS OBJECT
DIM aProps() as object
oMailMerge = createunoservice(“com.sun.star.text.MailMerge”)
oMailMerge.DataSourceName = “postgres”
…
Maybe something like - oMailMerge.DataSource.Password = “password”? This does not work.
Error:
Type: com.sun.star.sdbc.SQLException
Message: Couldn’t establish database connection to ‘sdbc:postgresql:postgresql://localhost:5432/postgres’
fe_sendauth: no password supplied
Thanks for your reply!
 
      
     (upper left area of answer).  It helps others to know there was an accepted answer.
 (upper left area of answer).  It helps others to know there was an accepted answer.