"A local database need not live within the confines of the data directory. For instance, using your example, the data
directory may be "c:\Program Files\Lotus\Notes\data", but a database could reside at d:\temp\fake.nsf. There is no
way to make that relative to the data directory.
You might want to try a more robust way of determining the relative path.
Possibly something like the example below."
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim dataDir As String
Dim fullpath As String
Dim relpath As String
dataDir = session.GetEnvironmentString( "Directory", True )
fullpath = db.FilePath
If Instr(1,fullPath,dataDir,5)>0 Then
relpath = Mid$(fullPath, Len(dataDir)+2)
Else
relpath = fullPath
End If
End Sub
previous page
|