Using libreoffice via process.start in vb.net

I am a simple user who has run into something that I can’t get to work.

Background:

I am a senior living in a senior apartment complex. On Thursday nights we play Bingo. I wrote a program in visual basic, now in visual studio community edition, to call Bingo. Creating the games has always been a manual thing - create an odg, then also export it as jpg. I have a odg I copy first then edit in libreoffice and then export as jpg. I decided to add the ability to create games to the program. Using process.start with the odg file name starts libreoffice and lets me edit the game. Trying to make export automatic by using process.start again on soffice with parameters for the conversion. Libreoffice seems to start in the background ok, but then exits without doing the export. I assume there is an error in the parameters I am passing but never see an error message.

Question:

Is there a way to log the errors from Libreoffice - in this case parameters it might be rejecting - when running from a process.start rather than interactively?

Please let me know if there are any questions, additional information needed, etc…

Thank you.

Hello @fargodwe ! Long time no see, hope you are feeling well?

I remember that you used Linux Mint before. But now you’re asking about Visual Basic. Does this mean you had to switch to Windows?
You can try the instructions given here - How to get a backtrace with WinDbg
But it will probably be easier and faster if you just show us the command line that the don’t wants to work correctly - maybe we will immediately see which of the parameters is specified incorrectly.
By the way! Do you close the odg file before starting the export? Maybe the command is not executed because the system cannot access an already open file?

Hi! Yep - I still run Mint on a Chromebook, but this is from my Windows laptop. It looks like the problem was in getting everything in the parameter string quoted correctly and I just couldn’t get it to work. I took the cheap way out and created a parameter driven .bat file that I process.start on and it works fine so I was able to accomplish what I needed to. Yep - the .odg file was closed - the entrie libreoffice process I started for that ended (I do a wait for the process to finish).

Appreciate the reply and hope things are going great for you!

1 Like