Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

@Prompt([LocalBrowse]...........) in script??

40 views
Skip to first unread message

Tony Coleman

unread,
Jul 2, 1998, 3:00:00 AM7/2/98
to

Does anybody know if there is a script equivolent for
@Prompt([LocalBrowse];etc..........)

Regards

TonyC


Scot D Haberman

unread,
Jul 2, 1998, 3:00:00 AM7/2/98
to

Yes there is but it is not supported. I cannot claim credit for
"discovering"
this feature (although I can claim credit for telling you).
I am not sure who the person was that originally discovered this.

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.

0 new messages