Domino 9 und frühere Versionen > ND8: Entwicklung
Screenshot im Dokument begrenzen
Bruce Willis:
--- Zitat von: Tode am 15.07.13 - 14:35:40 ---Ein Richtextitem definiert man IMMER als Richtextitem... Warum sollte man hier Variant wählen?
--- Ende Zitat ---
Na ja...
Hier z.B. ein Beispiel, das allerdings bei mir falsche Ergebnisse liefert:
--- Code: ---This script counts the number of embedded objects, object links, and file attachments in the
Body item of a document, and prints the results in the status bar. For example, the script
prints "3 attachments 2 links 4 objects."
Dim doc As NotesDocument
Dim rtitem As Variant
Dim attachCount As Integer
Dim linkCount As Integer
Dim objectCount As Integer
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
attachCount = 0
linkCount = 0
objectCount = 0
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
Select Case o.Type
Case EMBED_ATTACHMENT:
attachCount = attachCount + 1
Case EMBED_OBJECTLINK:
linkCount = linkCount + 1
Case EMBED_OBJECT:
objectCount = objectCount + 1
End Select
End Forall
End If
Print( attachCount & " attachments " & linkCount & _
" links " & objectCount & " objects " )
--- Ende Code ---
pram:
das macht man (ich) normal so:
--- Code: ---This script counts the number of embedded objects, object links, and file attachments in the
Body item of a document, and prints the results in the status bar. For example, the script
prints "3 attachments 2 links 4 objects."
Dim doc As NotesDocument
Dim item as NotesItem
Dim rtitem As NotesRichtextItem
Dim attachCount As Integer
Dim linkCount As Integer
Dim objectCount As Integer
'...set value of doc...
Set item = doc.GetFirstItem( "Body" )
attachCount = 0
linkCount = 0
objectCount = 0
If not item is nothing then ' test if item exists!
If ( item.Type = RICHTEXT ) Then
set rtItem = item ' if item is type of richtext.
Forall o In rtitem.EmbeddedObjects
Select Case o.Type
Case EMBED_ATTACHMENT:
attachCount = attachCount + 1
Case EMBED_OBJECTLINK:
linkCount = linkCount + 1
Case EMBED_OBJECT:
objectCount = objectCount + 1
End Select
End Forall
End If
End If
Print( attachCount & " attachments " & linkCount & _
" links " & objectCount & " objects " )
--- Ende Code ---
Bruce Willis:
--- Zitat von: pram am 15.07.13 - 14:02:51 ---...
Wenn du glück hast, reicht ein rtItem.compact() oder rtItem.update() vor dem Save
....
--- Ende Zitat ---
Hallo Roland,
ich hab beides eingetragen. Sicher ist sicher! ;)
Heute kam das Problem wieder.
Die Screenshots hier zeigen, wie das Body vor dem Versenden/Speichern und danach aussah... :-:
(Maßstab geändert)
Allerdinds ist das Body nicht vollständig verschwunden wie früher...
Any ideas zum Workaround? :)
Gruß
Leo
pram:
Die Schrift ist auch völlig anders, hast du etwa "Store Contents as MIME/HTML" im Feld aktiviert oder wurde das Dokument in irgend einer Weise (MailRouter/Bearbeitung im Web) von HTML in Richtext oder umgekehrt konvertiert.
Gruß
Roland
Bruce Willis:
--- Zitat von: pram am 19.07.13 - 15:26:58 ---Die Schrift ist auch völlig anders
--- Ende Zitat ---
Stimmt, hatte ich nicht beachtet. Die Punkte sind auch verschwunden.
--- Zitat von: pram am 19.07.13 - 15:26:58 ---hast du etwa "Store Contents as MIME/HTML" im Feld aktiviert
--- Ende Zitat ---
Nein, hab gerade überprüft.
--- Zitat von: pram am 19.07.13 - 15:26:58 ---oder wurde das Dokument in irgend einer Weise (MailRouter/Bearbeitung im Web) von HTML in Richtext oder umgekehrt konvertiert.
--- Ende Zitat ---
Gute Frage... Das Dok wurde definitiv nicht hin und her gemailt und auch nicht im Web erstellt oder bearbeitet... :-:
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln