Ich habe folgenden Code und er gibt mir einen Fehler aus:
Sub Click(Source As Button)
Dim oSession As NotesSession
Dim dbCurrent As NotesDatabase
Dim oWorkspace As New NotesUIWorkspace
Dim docHaupt As NotesUIDocument
Dim docDialog As NotesDocument
Dim nDialog As Integer
Set dbCurrent = oSession.CurrentDatabase
Set docHaupt = oWorkspace.CurrentDocument
Set docDialog = dbCurrent.CreateDocument
ndialog = oWorkspace.Dialogbox("Dialog",True,True,False,False,False,docDialog)
If nDialog Then
docHaupt.Name = docDialog.DName(0)'Not a Member Name
docHaupt.Vorname = docDialog.DVorname(0)''Not a Member Vorname
docDialog.Form = "Dialog"
Call docDialog.Save(True,True,True)
End If
End Sub
und bei diesem Fehler komme ich nicht weiter. Danke schonmal für die Hilfe.
Gruß
André
Es will nicht gehen. Er sagt mir an folgender Stelle:
docHaupt.Name = docDialog.DName(0)
docHaupt.Vorname = docDialog.DVorname(0)Vorname
Not a Member Name
Not a Member Vorname
Woran kann das liegen?
Gruß
André
Ok den Fehler habe ich un raus, aber wie es ja so ist habe ich einen neuen:-( Des sagt bei mir "Object Variable not Set"
Set dbCurrent = oSession.CurrentDatabase
Das wird vielleicht ne schwere Geburt. *g*
Gruß
André
@adminnaddel:
hier ist der fertige Code.
Sub Click(Source As Button)
Dim oWorkspace As New NotesUIWorkspace
Dim oSession As NotesSession
Dim dbCurrent As NotesDatabase
Dim docHaupt As NotesDocument
Dim docDialog As NotesDocument
Dim nDialog As Variant
Set oSession = New NotesSession
Set dbCurrent = oSession.CurrentDatabase
Set docHaupt = oWorkspace.CurrentDocument.Document
Set docDialog = dbCurrent.CreateDocument
nDialog = oWorkspace.Dialogbox("Dialog",True,True,False,False,False,False,"neue Person",docDialog)
If nDialog Then
docHaupt.Name = docDialog.DName(0)
docHaupt.Vorname = docDialog.DVorname(0)
docDialog.Form = "Dialog"
Call docDialog.Save(True,True,True)
End If
End Sub
Gruß
Darkface