Hi
I created a Visual Basic Script that sends Notes mails through COM.
If the Notes client is not running it will be started automatically, but with an “empty” Workspace. No database icons are displayed unless I click on the corresponding bookmark.
The Workspace is set as default Home Page.
I found some postings here pointing to topics like Single Sign On (SSO) or to the “Don’t prompt for a password from other Notes-based programs” Preference. But this issue has nothing to do with them, I checked it out.
2 code examples below.
Any ideas are welcome.
Thanks in advance
Bodo
=========================================
Here are two different code examples, both producing the same effect:
Sub test01()
Dim SessionNotes As Object, NotesDB As Object, NotesDoc As Object
Dim strServer As String
Dim strMailFile As String
Set SessionNotes = CreateObject("Notes.NOTESSESSION")
'-- Read from notes.ini
strServer = SessionNotes.GetEnvironmentString("MailServer", True)
strMailFile = SessionNotes.GetEnvironmentString("MailFile", True)
Set NotesDB = SessionNotes.GetDatabase(strServer, strMailFile)
MsgBox NotesDB.Title & ": " & NotesDB.FilePath
End Sub
Sub test02()
Dim Notes_Session As New NotesSession
Notes_Session.Initialize
Dim strServer As String
strServer = Notes_Session.GetEnvironmentString(“MailServer”, True)
Dim Notes_Dir As NotesDbDirectory
Dim Notes_DB As NotesDatabase
Dim Notes_Doc As NotesDocument
Set Notes_Dir = Notes_Session.GetDbDirectory(strServer) '-- Domino-Server’s TCP/IPs Hostname
Set Notes_DB = Notes_Dir.OpenMailDatabase
MsgBox NotesDB.Title & ": " & Notes_DB.FilePath
End Sub