Open an external file/application

Simple code to append at the end of a function or agent to open up the generated file or other file.
LotusScript

(Declarations)

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(Byval hwnd As Long, _
Byval lpOperation As String, _
Byval lpFile As String, _
Byval lpParameters As String, _
Byval lpDirectory As String, _
Byval nShowCmd As Long) As Long

Put this wherever you want to invoke the function

Dim iret As Long
Const SW_SHOWNORMAL = 1
iret = ShellExecute( 0, "Open", targetfilenameandpath, "", "c:\", SW_SHOWNORMAL ) 

Posted by fbrefere001 on Monday May 22, 2006