Das Notes Forum
Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: Gogun_Beokz am 03.08.05 - 11:29:55
-
Hallo,
habe folgendes Problem, unzwar bekomm ich folgende Fehlermeldung "Document command is not available". Ich habe mit dem Debugger nachgeschaut und gesehen das er kein uidoc findet wenn ich jetzt aber die letzten zwei Zeilen als Kommentar mache, wird das Dokument geöffnet.
Sub Initialize
'Backend
Dim s As New NotesSession
Dim db As NotesDatabase
Dim ProfileDoc As NotesDocument
'Frontend
Dim ws As New NotesUIWorkspace
Set db = s.CurrentDatabase
Set ProfileDoc = db.GetDocumentByUNID
("027BCCB898BEE75FC12570510021C5F3")
Call Profiledoc.Save(True, True)
Dim uidoc As NotesUIDocument
Set uidoc = ws.EditDocument(True, ProfileDoc)
Call uidoc.Refresh
Call uidoc.Save
der Fehler liegt nach dem Debugger in der zweitletzten Zeile.
Schonmal Danke.
Mit freundlichen Grüßen
GoGuN_B3okZ
-
achja noch eine Anmerkung das profiledoc ist kein Profildokument erfüllt nur den gleichen Zweck.
-
So sollte es gehen:
'Backend
Dim s As New NotesSession
Dim db As NotesDatabase
Dim ProfileDoc As NotesDocument
'Frontend
Dim ws As New NotesUIWorkspace
Set db = s.CurrentDatabase
Set ProfileDoc = db.GetDocumentByUNID
("027BCCB898BEE75FC12570510021C5F3")
if not (Profiledoc is Nothing ) then
Dim uidoc As NotesUIDocument
Set uidoc = ws.EditDocument(True, ProfileDoc)
if uidoc.EditMode then
Call uidoc.Refresh
Call uidoc.Save
end if
end if
Das
Call Profiledoc.Save(True, True)
habe ich gelöscht, da es keinen Sinn macht.
Andreas
-
Ja funktioniert! aber warum was war den falsch? da sind doch jetzt nur noch ein Fälle abgefangen worden. Liegt es am
Dim uidoc As NotesUIDocument? Weil das kommt ja nur vor wenns das Profiledoc nicht gibt und bei mir immer.
DANKE
GoGuN_B3okZ