Regards
TonyC
Undocumented FileOpen Dialog Box
Here is a great way to display a "windows" style Open File Dialog box
using the Notes dll's installed on your machine. I have tried this on
v4.5x and 4.6 but only on Win95 and Win Nt 4.0 (it also works on os/2
but
the dll for the declare is different).
If you would like to prompt the user to select a file, just place the
following code in the "(Declarations)" event:
Declare Function fOpenFileDialog Lib "nnotesws" Alias "NEMGetFile" (
iUnknown As Integer, Byval sFileName As String, _
Byval sFilter As String, Byval sTitle As String ) As Integer
The first parameter "iUnknown" is not used so set it to 0. The second
parameter "sFileName" is the initial path and also is the return buffer
for the selected path/file name. The third parameter "sFilter" is the
file selection filter (must NEVER be empty or null) and has the format
"Text Files|*.txt|All files|*.*|" (do not leave off the trailing |).
The
fourth parameter sTitle is the title for the dialog box.
To use this function, just place the following LotusScript code on an
action button (or where ever you want it to work):
Dim sFileName As String*256
sFilename = "C:\TEMP\" & Chr(0) ' Set initial directory and null
terminator
Call NEMGetFile( 0, sFileName, "Word|*.doc|Text|*.txt|All|*.*|", "Test
Me")
Messagebox sFilename ' Display selected path and file
That is all there is to it.