Hi
In following directory I have file wich in every computer is named differently and I want to write function wich allow me to determine the name of this file. The extension is ".nsf" and its allways the only file in this directory. I made the code but it doesnt work.
C:\Users\kuckam\AppData\Local\IBM\Notes\Data\mail\gdansk
Function GetNSF(ByRef strFileName As String) As Boolean
On Error Resume Next
strFileName = Dir(Environ("COMPUTERNAME") & "\Local\IBM\Notes\Data\Mail\gdansk\*.nsf")
GetNSF = (strFileName <> vbNullString)
End Function
Sub test()
Dim strFileName As String
If GetNSF(strFileName) Then
Debug.Print strFileName
End If
End Sub
In following directory I have file wich in every computer is named differently and I want to write function wich allow me to determine the name of this file. The extension is ".nsf" and its allways the only file in this directory. I made the code but it doesnt work.
C:\Users\kuckam\AppData\Local\IBM\Notes\Data\mail\gdansk
Function GetNSF(ByRef strFileName As String) As Boolean
On Error Resume Next
strFileName = Dir(Environ("COMPUTERNAME") & "\Local\IBM\Notes\Data\Mail\gdansk\*.nsf")
GetNSF = (strFileName <> vbNullString)
End Function
Sub test()
Dim strFileName As String
If GetNSF(strFileName) Then
Debug.Print strFileName
End If
End Sub