There is no data type called Object in Lotusscript.
You need to declare those variables with their proper object types, e.g. NotesDatabase, NotesView, NotesDocument, etc.
Also, you should declare and initialize a NotesSession object, not use GetObject() in Lotusscript. It looks like you are trying to write COM code, not Lotusscript.
Another suggestion is to use variable names that are conforming to the de-facto (established) naming convention. If you look at other Lotusscript code, you will notice that the variables generally are named the same way, making it much easier to read other developer's code. Yet another recommendation is to declare all Notes objects/classes first, grouped/sorted in the order they are being used, followed by the rest of the variables, before any of them are assigned values.
Your code should look more like this:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim item As NotesItem
Dim ws As New NotesUIWorkspace
Dim uidoc as NotesUIDocument
Dim mailServer As String
Dim mailFileName As String
Dim filePath As String
Dim resultCount As Integer
Dim subject As String
mailServer = "server"
mailFileName = "mailfile.nsf"
resultCount = 0
' *** Open the specified mail file using back-end classes
Set db = new NotesDatabase(mailServer, mailFileName)
' *** Get the document currently open in the Notes client using front-end classes
Set uidoc = ws.CurrentDocument
End Sub
You see how much easier this is to read, not to mention it is both shorter and working.
I also recommend to always use variable names in English. If you ever need to ask someone for help, for example here on Stack Overflow, it is much easier for them to understand your code if you use variable names that are easy to understand. This is also the reason why you should use the standardized names for Notes objects/classes.
I wrote a series of articles about how to write better Lotusscript code, I think they may help you: http://blog.texasswede.com/how-to-write-better-code-in-notesdomino/