Domino 9 und frühere Versionen > ND6: Entwicklung
RichText-Feld mit Kopfzeilen ergänzen
Syeg:
Hoi z'samme
Ein neues Dokument (in einer anderen DB) soll in einem RichText-Feld vor dem Inhalt vom Body der aktuellen Mail noch ein paar "Kopfzeilen" enthalten.
Mit folgendem Code erhalte ich den Fehler "Problem mit input variant" (wobei "diesMail" und "neuToDo" das alte und das neue Dokument ist, "Inhalt" ein RichText-Feld ist):
.......
Dim neuInhalt As NotesRichTextItem
Dim Kopf As String
Set neuInhalt = diesMail.GetFirstItem("Body")
Kopf = "-------------------------------------------------------------"
Kopf = Kopf + Chr(13) + Cstr(diesMail.Principal (0)) + " - "
...etc
Kopf = Kopf + Chr(10) + Chr(13)
Kopf = Kopf + "----------------------------------------------------"
Call neuInhalt.BeginInsert(Kopf)
Call neuInhalt.CopyItemToDocument(neuToDo,"Inhalt")
..............
Was mache ich falsch?
Esteban
ascabg:
Hi,
An welcher Stelle Deines Codes kommt denn der Fehler?
(Debugger)
Andreas
Syeg:
Hi Andreas
Das ist wirklich wichtig! Der Fehler kommt ja schon beim ersten call, dem call für den BeginInsert ... Aber ich komme trotzdem nicht klar ...
ascabg:
Hi Esteban,
Kleiner Auszug aus der Design-Help
--- Zitat ---Call notesRichTextItem.BeginInsert( element, [ after ] )
Parameters
element
NotesEmbeddedObject, NotesRichTextDocLink, NotesRichTextNavigator, NotesRichTextRange, NotesRichTextSection, or NotesRichTextTable. The element. A NotesRichTextNavigator element means the element at the current position of the navigator. Other elements mean the specified element.
after
Boolean. Optional.
True puts the insertion position at the end of the element.
False (default) puts the insertion position at the beginning of the element.
--- Ende Zitat ---
Syeg:
Hi Andreas
Heisst das, ich kann keinen Text anhängen?
Oder muss ich da gans anders vorgehen? Ich habe nichts anderes gefunden als BeginInsert...
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln