Select Directory Catalog

Directory Catalog Dialog Box Explorer Stile
(Option Declaration) 
Type TagBrowseInfo 
        hwndOwner As Long 
        pidlRoot As Long 
        pszDisplayName As String 
        lpszTitle As String 
        ulFlags As Long 
        lpFn As Long 
        iImage As Long 
End Type 
Declare Function SHGetMalloc Lib "Shell32.dll" Alias "SHGetMalloc" _ 
(Malloc As Variant) As Long 
Declare Function SHGetSpecialFolderLocation Lib "Shell32.dll" Alias "SHGetSpecialFolderLocation" _ 
(Byval hwnd As Long, Byval nFolder As Long, PIDL As Long)  As Long 
Declare Function SHBrowseForFolder Lib "Shell32.dll" Alias "SHBrowseForFolder" _ 
(BROWSEINFO As TagBrowseInfo)  As Long 
Declare Function SHGetPathFromIDList  Lib "Shell32.dll" Alias "SHGetPathFromIDList" _ 
(Byval PIDL As Long, Byval pszPath As String)  As Long 
Sub Click(Source As Button) 
        Dim BROWSEINFO As TagBrowseInfo 
        Dim DisplayName As String * 260 
        Dim Title As String 
        Dim SPIDL As Long 
        Dim PIDL As Long 
        Dim MAlloc As Variant 
        Dim Workspace As New NotesUIWorkspace 
        Dim Doc As NotesDocument 
        
        Set Doc = Workspace.CurrentDocument.Document 
        R = CoInitialize(0&) 
        If SHGetMalloc(MAlloc) <> 0 Then Exit Sub 
        If SHGetSpecialFolderLocation(0&, 17&, SPIDL) = 0 Then 
                Title = "������� ����� ��� ���������� ������!" 
                
                BROWSEINFO.pidlRoot = SPIDL 
                BROWSEINFO.ulFlags = 64& 
                BROWSEINFO.hwndOwner = 0& 
                BROWSEINFO.pszDisplayName = DisplayName 
                BROWSEINFO.lpszTitle = Title 
                PIDL =  SHBrowseForFolder(BROWSEINFO) 
                If PIDL <> 0  Then 
                        On Error        Resume Next 
                        If  SHGetPathFromIDList(PIDL, DisplayName) <> 0 Then 
                                Doc.DirectoryName = DisplayName 
                        Else 
                                Beep 
                        End If 
                        Malloc.Free(PIDL) 
                End If 
                Malloc.Free(SPIDL) 
        End If 
        Set Malloc = Nothing 
End Sub
This was first published in January 2001

Dig deeper on Domino Resources

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.uk

Close