Hallo ich benutze gerade ein Script in dem ein Problem auftaucht.
Ein doc wird gmeacht und an die folgende Funktion uebergeben,
in der zeile
kommt es zur nachricht Cannot Locate Form: main
davor zeigt aber die Messagebox doc.UniversalID das UNID des docs also nehme ich an das doc ist OK.
Woran kann das liegen?
Code
Function RefreshDocFields (doc As NotesDocument) As String
'** Refresh the fields on a document, and return the NoteID of
'** the refreshed doc (I don't think this would cause the NoteID
'** to change, but just in case)
On Error Resume Next
'** before we save the uidoc, disable any MIME conversion warnings
'** by setting the MIMEConvertWarning parameter in Notes.ini to 1
Dim session As New NotesSession
Dim oldWarningVal As String
oldWarningVal = session.GetEnvironmentString("MIMEConvertWarning", True)
Call session.SetEnvironmentVar("MIMEConvertWarning", "1", True)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Messagebox doc.UniversalID
Set uidoc = workspace.EditDocument(True, doc)
Call uidoc.Save
RefreshDocFields = uidoc.Document.NoteID
Call uidoc.Close(True)
Alles anzeigen