How to get mail-in "server" and "file name" with VB (Visual Basic)

Hello,first sorry for my bad english…

i searched the forum but couldn’t find what i was looking for.

I’am searching for the code to get the “Server” and “File name” entry out of an mail-in database in Visual Basic (VB).

For normal adressbook entrys i am using the following code. And it works perfect.

#######################################

Set session = CreateObject(“Notes.NotesSession”)

Set db = session.GETDATABASE(“”, “names.nsf”)

ViewStr = “People”

Set view = db.GetView(ViewStr)

person = “Bill Gates”

Set doc = view.GetDocumentByKey(person)

'Check how many adressbook entrys availible

doccount = view.FTSearch(person, 0)

MsgBox (“There are " & doccount & " entrys.”)

Mailserver = doc.GetItemValue(“mailserver”)(0)

Mailfile = doc.GetItemValue(“mailFile”)(0)

Msgbox ("Mailserver: " & mailserver & " Mailfile: " & mailfile)

#######################################

#######################################

For a mail-in-database i am using this code:

#######################################

Set session = CreateObject(“Notes.NotesSession”)

Set db = session.GETDATABASE(“”, “names.nsf”)

ViewStr = “Server\Mail-In Databases and Resources”

Set view = db.GetView(ViewStr)

person = “01_example_mail_in_database”

Set doc = view.GetDocumentByKey(person)

the following lines are showing that the mail-in database is avalible. But i couldn’t access the databse entrys.

'Check how many adressbook entrys availible

doccount = view.FTSearch(person, 0)

MsgBox (“There are " & doccount & " entrys.”)

the following lines doesn’t work for mail-in database

Mailserver = doc.GetItemValue(“mailserver”)(0)

Mailfile = doc.GetItemValue(“mailFile”)(0)

Msgbox ("Mailserver: " & mailserver & " Mailfile: " & mailfile)

#######################################

What is wrong?

And is there an easier way to read out a specified “adressbook”-entry (like in my first code example)?

Would be very pleased if someone could give me useful hints / solution.

Greetz Spam Bam