| View previous topic :: View next topic |
| Author |
Message |
flintstones1962 Newbie

Joined: 11 Sep 2007 Posts: 4
|
Posted: Tue Sep 11, 2007 11:15 pm Post subject: Calling Swriter from Cobol |
|
|
Hello,
I've posted this issue some months ago, and tried all possible solutions to call 'swriter' from a cobol program but it doesn't load.
When a call is made from a Cobol program to open a document created with swriter, swriter doesn't start. ( while the same cobol satement works with MSWORD without any problem)
The cobol statement is something like this:
Call "c:\program files\......\swriter.exe mydoc.odt'
mydoc.odt already exist on the disk.
checking the result-code of the call statement from cobol shows that the call statement has been executed without any error.
the last solution I've used is to create a batch file from the cobol program and put the command line in, and call the batch file, but also it doesn't work!!!!!
Any tips?
Regards |
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Wed Sep 12, 2007 2:10 am Post subject: |
|
|
Hi,
- You must have the complete path for the document you open
- It's sufficient to use soffice.exe for opening an OpenOffice.org document
- You may have to enclose the program path in double quotes, and also the document path
As example, this works from the command window:
| Code: | | "c:\Program Files\OpenOffice.org 2.2\program\soffice.exe" "d:\OOo\Tutorials.odt" |
Hope this helps
______
Bernard |
|
| Back to top |
|
 |
flintstones1962 Newbie

Joined: 11 Sep 2007 Posts: 4
|
Posted: Wed Sep 12, 2007 9:45 am Post subject: Tried, but it doesn't work!!!!! |
|
|
Hello,
Thanks for your reply.
I've tried your solution, but it doesn't work.
Any other tips,
Greetings |
|
| Back to top |
|
 |
flintstones1962 Newbie

Joined: 11 Sep 2007 Posts: 4
|
Posted: Fri Sep 14, 2007 5:06 am Post subject: finally, it worked |
|
|
Hello,
Finally, after alot of work it worked.
Regards, |
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Fri Sep 14, 2007 6:00 am Post subject: Re: finally, it worked |
|
|
| flintstones1962 wrote: | | Finally, after alot of work it worked. | So, what was the solution ?
Share this valuable info with all (not yet retired) COBOL programmers  |
|
| Back to top |
|
 |
|