RUNWIN Command (OpenInsight 32-Bit)
At 29 JAN 2004 08:54:48PM Sedick Cloete wrote:
Now that the CHOOSEFILE command returns the longname of the file, I have a problem with the RUNWIN command when the name of the file I want to open exceeds 8 characters. Using OI4.1.3.
Utility File Dialog and Run32 gives me a Runtime error '429' ActiveX component can't create object.
At 30 JAN 2004 07:52AM Mike Ruane wrote:
Sedick-
What if you put quotes around the file you want to run?
eg
filename=c:\temp\myreallylongfilename.exe"
x=Utility('RUNWIN', quote(filename) )
At 31 JAN 2004 11:07PM Sedick Cloete wrote:
Thanks Mike,
What I need to do, is to open a file with Word, Excel, etc depending on the file extension.
What can my problem be with Run32?
At 01 FEB 2004 02:05AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
It sounds as though you are using the deprecated VB 32 bit extensions. Try this instead.
World Leaders in all things RevSoft
At 06 FEB 2004 10:39AM Sedick Cloete wrote:
Thanks Sprezz, but the link to the document you referred is not present anymore.
At 06 FEB 2004 01:06PM Bob Carten wrote:
declare function Get_PRoperty
Sedick:
the Run32 stuff was a workaround for OI16. It is no longer needed.
Try the ShellExecute Function, which is the windows API call that does what you want
For Example
Subroutine test(void)
equ NULL$ to \00\
hWnd=Get_PRoperty(@Window, 'HANDLE')
action=Open"
filename=Book1.xls"
path=c:\temp"
call ShellExecute(hWnd, action:Null$, filename:Null$, Null$ , Path:Null$, 1)
return
*
Notes:
1. If you use an action of Print instead of open it will print the file.2. Office 2003 uses an XML format for excel and word files. It is possible to save a spreadsheet as xml, Osread it, edit it programmatically, oswrite a the result then launch it or print it with Shellexecute
At 09 FEB 2004 07:34AM Sedick Cloete wrote:
Thanks Bob
At 09 FEB 2004 08:25AM The Sprezzatura Group wrote:
Weird - works here.
The Sprezzatura Group
World Leaders in all things RevSoft