Does anyone have a clue why I continue to get “Object Variable not set”?
I think the problem is the location name. It runs to the last line and throws up the error. I’m out of ideas.
Thank you
Mike
'Picks up Local Address Book and mailfile name
Set db2 = New NotesDatabase("", "names.nsf")
Dim LocName As Variant
Dim mailfile As String
Dim doc2 As NotesDocument
Dim itm As NotesItem
Dim collection As NotesDocumentCollection
'finds "Office(Network)" Location Document
Set collection = db2.FTSearch( """Office""", 0, FT_SCORES, FT_STEMS)
Set doc2 = collection.getfirstdocument
'Finds the mail file and sets the variable
Set itm = doc2.GetFirstItem("MailFile")
mailfile = itm.text & ".nsf"