hcl-bot
1
Need to access attachments data (ideally file raw bytes, but even the names would be great) from LotusScript before a message is saved or sent.
I cannot use NotesDocument.Items, because all attachments share same field name “$FILE” and I can see only the first instance.
It must be possible, because $FILE items are shown correctly in the LotusScript debugger.
hcl-bot
2
Subject: Never mind, that’s silly…
- If Items can’t find more than one, how do you get more than one NotesRichtextItem? Sheesh…
hcl-bot
3
Subject: No RichTextItems are available at that time anyways…
I could iterate through all RichText elements of the doc, but the body of backend doc is missing in Querysend/Querysave event.
Body exists in Postsave, with EmbeddedObjects ok, but it is too late.
hcl-bot
4
Subject: Please read about uidoc.Refresh, 1st argument
hcl-bot
5
Subject: Body must be current field
It worked fine, thanks!
One strange thing though: If the focus is outside the message body, you get “Only plain text can be used in this type of field” error.
In Memo (Form):
Sub Querysend(source as NotesUIDocument, Continue as Variant)
…
source.GotoField(“Body”)
Call source.Refresh(True)
…
seems to work.
hcl-bot
6
Subject: There’s something else in your code making that happen
Something in the QueryRecalc event for instance.