title: Lotus Notes Database Search
body: <p>i am trying to write a code to open VBA and do search based on the cell value in A1 (integer). i managed to write a code up to point where i can open the lotus notes and go to specific database. I tried many online codes but couldn't manage to find the code to search in that database. "Lotus.NotesSession" doesn't work the excel version i use. Could you please help me to finish this code. Code is below:</p>
  
  <pre><code>Sub macro4()
  
  Dim uiWs As Object
  Dim dbname As String
  Dim serverName As String
  Dim db As NotesDatabase
  Dim doccol As NotesDocumentCollection
  Dim varA As Integer
  
  
  
  dbname = "***"
  
  serverName = "***"
  
  
  Set uiWs = CreateObject("Notes.NotesUIWorkSpace")
  
  Call uiWs.OpenDatabase(serverName, dbname) 
  
  Set db = uiWs.GetDatabase(serverName, dbname) ----&gt;where i get the error
  
  varA.Value = Sheets("sheet1").Range("A1").Value
  
  Set doccol = db.FTSearch(varA, Nothing, 0)
  
  End Sub
  </code></pre>