Docx to PDF on windows using command line fails

Hi, I’m trying to convert a docx to pdf using the command line on windows 7 but it will fail silently.
I see that it creates a temporary file called .~lock.a.pdf# in the outpour dir. (the original file is called a.docx)
I see the soffice.exe and soffice.bin processes in the task manager for a few seconds then shuts down. The temporary remains but no PDF or error or anything.

Im using libreoffice 4 from windows powershell (tried regular command line too) with this command:
&(“C:\Program Files (x86)\Appz\LibreOffice 4\program\soffice.exe”) -headless -convert-to pdf:writer_pdf_Export -outdir C:\TEST\PDF C:\TEST\a.docx

On MS Windows 7 Pro. SP1 with LibreOffice 5.0.1 I was able to convert a rather complex 150-pages DOCX to PDF by running the following in cmd.exe:

"C:\Program Files (x86)\LibreOffice 5\program\soffice.exe" -headless -convert-to pdf:writer_pdf_Export -outdir C:\temp C:\temp\a.docx

After a couple of minutes of processing the C:\temp\a.pdf file was created.

I noticed that the command does nothing if another instance of LibreOffice (that is soffice.exe) is running at the time the command is invoked.

Are you able to export that DOCX file to PDF manually? Could you attach the a.docx file you tried to convert?