Domino 9 und frühere Versionen > ND6: Entwicklung
Attachments verloren beim Kopieren
(1/1)
Gandhi:
Mein Problem:
Beim Kopieren eines RTItems innerhalb eines Dokumentes gehen die Attachments verloren - alle bis auf eines (keine erkennbare Regel welches behalten wird).
Das passiert nicht immer - teilweise werden auch 2 behalten.
Der hier verwendete Code sieht wie folgt aus: (cDoc ist ein NotesDocument)
--- Code: ---If Not (body Is Nothing) Then
Set tmpRTI=cdoc.CreateRichTextItem("tmpRTI")
If Not (tmpRTI Is Nothing) Then
Call tmpRTI.AppendText(cDoc.kontaktIntern(0) & ": " & Chr(13))
Call tmpRTI.AppendRTItem(body)
Call cDoc.RemoveItem("Body")
Set Body=cdoc.CreateRichTextItem("Body")
Call body.AppendRTItem(tmpRTI)
Call cDoc.RemoveItem("tmpRTI")
End If
End If
cdoc.save True, False, True
--- Ende Code ---
Habe ich da jetzt etwas falsches getan und wenn ja was oder muss ich die IBM verklagen? ;)
Glombi:
Vielleicht hängts an den vielen Remove. Versuch mal mittels .Update alle Rich Text Operationen abzuschließen bevor das Script weiterläuft.
If Not (body Is Nothing) Then
Set tmpRTI=cdoc.CreateRichTextItem("tmpRTI")
If Not (tmpRTI Is Nothing) Then
Call tmpRTI.AppendText(cDoc.kontaktIntern(0) & ": " & Chr(13))
Call tmpRTI.AppendRTItem(body)
call tmpRTI.Update
Call cDoc.RemoveItem("Body")
Set Body=cdoc.CreateRichTextItem("Body")
Call body.AppendRTItem(tmpRTI)
call body.Update
Call cDoc.RemoveItem("tmpRTI")
End If
End If
cdoc.save True, False, True
Hintergrund:
Processes all pending operations on a rich text item.
Hinweis This method is new with Release 6.
Defined in
NotesRichTextItem
Syntax
Call notesRichTextItem.Update
Usage
Operations on a rich text item are queued for efficiency. The order and time of completion are not predictable. Use this method to ensure that processing is complete at a certain point.
This method is useful when interacting with the front-end classes.
Andreas
Gandhi:
Werde ich tun.
Danke erstmal.
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln