Mal ne blöde Frage: Warum speicherst Du den HTML- Code nicht als File (z.B. ins Temp- Verzeichnis) und benutzt dann die NotesUIDocument.Import:
Call uidoc.Import( "HTML File" , filePath )
natürlich muss Dein Cursor an der richtigen Stelle im Richtext- Feld stehen, aber ansonsten funktioniert das wunderbar....
Hier mal ein Auszug aus einer "dynamisch" generierten Signatur:
| sigHTMLs = "<HTML>" |
| sigHTMLe = "</HTML>" |
| sigTITLEs = "<TITLE>" |
| sigTITLEe = "</TITLE>" |
| sigBODYs = "<BODY>" |
| sigBODYe = "</BODY>" |
| sigFONT1s = |<FONT STYLE="font-size: 10pt; color: black; font-family: 'Arial'">| |
| sigFONT2s = |<FONT STYLE="font-size: 8pt; color: black; font-family: 'Arial'">| |
| sigFONT3s = |<FONT STYLE="font-size: 8pt; color: #00a973; font-family: 'Arial'">| |
| sigFONTe = "</FONT>" |
| |
| tmpPath = getTmpPath |
| filePath = tmpPath & "signature.html" |
| On Error Resume Next |
| Kill filePath |
| On Error GoTo 0 |
| Open filePath For Output As fileNr |
| Print #fileNr , sigHTMLs |
| Print #fileNr , sigTITLEs & sigTITLEe |
| Print #fileNr , sigBODYs |
| |
| Print #fileNr , sigFONT1s |
| Print #fileNr , "<BR />" |
| ForAll value In arrLongSignature |
| Print #fileNr , value |
| Print #fileNr , "<BR />" |
| End ForAll |
| If Not docCompany Is Nothing Then |
| arrLongDisclaimer = Evaluate( |@Explode( CompanyDisclaimer ; @Char( 0 ) : @Char( 10 ) : @Char( 13 ) )| , docCompany ) |
| arrLongDisclaimer = Replace( arrLongDisclaimer , badWords , goodWords ) |
| ForAll value In arrLongDisclaimer |
| Print #fileNr , value |
| Print #fileNr , "<BR />" |
| End ForAll |
| End If |
| Print #fileNr , "<BR />" |
| Print #fileNr , "<BR />" |
| Print #fileNr , sigFONTe |
| Print #fileNr , sigBODYe |
| Print #fileNr , sigHTMLe |
| Close #fileNr |
| |
| Call uidoc.Import( "HTML File" , filePath ) |
| Kill filePath |
Deklarationen fehlen, ausserdem die Funktion "getTmpPath" sowie die Information, woher docCompany kommt, aber so vom Prinzip her sollte es klar sein..
Das ganze kann man natürlich auch mit einem Stream machen...
HTH
Tode