Hi,
da gibt es eine API-Funktion für, also falls nur Windows verwendet wird, sollte es so gehen :
Das hier in den Declaration-Teil :
Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias
"SHGetPathFromIDListA" (Byval pidl As Long, Byval pszPath As String) As Long
Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA"
(lpBrowseInfo As BROWSEINFO) As Long
Dann eine eigene Funktion einbauen :
Function BrowseFolder (path As String, windowtitle As String) As String
Dim X As Long, bi As BROWSEINFO, dwIList As Long
Dim wPos As Integer
Dim cam2 As String
bi.pszDisplayName = path
bi.hOwner = hWndAccessApp
bi.lpszTitle = title
bi.ulFlags = BIF_RETURNONLYFSDIRS
dwIList = SHBrowseForFolder (bi)
cam2 = Space$(512)
X = SHGetPathFromIDList(Byval dwIList, Byval cam2)
If X Then
wPos = Instr (cam2, Chr(0))
BrowseFolder = Left$ (cam2, wPos - 1)
Else
BrowseFolder = ""
End If
End Function
Und dann das hier in nen Button :
Sub Click (Source As Button)
Dim session As New notessession
Dim wk As New notesuiworkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim folder As String
Set uidoc = wk.CurrentDocument
Set doc = uidoc.Document
folder = BrowseFolder (doc.CERT_Destination(0), "Choose the folder to save ID File:")
End Sub
Dann müßte natürlich noch was mit dem Inhalt von "folder" passieren, aber das überlasse ich deiner Kreativität