Using shell() command with UNC pathname

Creating a macro - Writing a Script - Using the API

Using shell() command with UNC pathname

Postby stoni » Sat Apr 19, 2008 9:58 pm

from a macro I want to execute an external program, stored on the server with the shell() command. But I have to use the UNC notation (\\server\path\program.exe). When I run the macro, I always get the failure: "File could not be found!". Does anybody knows, if it is possible to use UNC notation with the shell() command, and whats the correct syntax? I tryed also the Url notation - without success too... :cry:
With the oShell.execute("\\server\path\program") command it works properly, but I need the functionality to wait until the called programm returns...

I want your kindly helps.
Thanks a lot
Posts: 1
Joined: Sat Apr 19, 2008 9:36 pm

Re: Using shell() command with UNC pathname

Postby Villeroy » Sun Apr 20, 2008 6:12 pm

This is quite specific to the Windows operating system, but OOo is a multi-platform suite. I could not find any references to UNC in the developer's guide. However, the Basic language provides one Windows specific goodie. You may be able to get the system path out of the UNC by calling some Windows dll. See Basic online help on keyword "Declare".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Posts: 24790
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 7 guests