0
私のプロジェクトでは、生成ボタンをクリックするたびにLotusScriptエージェントを実行して、「添付ファイル」リッチテキストフィールド内に「.pdf」ファイルを作成します。ここでリッチテキストフィールドで複数のドキュメントを添付する
ある一つの文書に挿入するための私のスクリプト:
' ...
Dim oitem As NotesRichTextItem, eo As NotesEmbeddedObject, path$, template
path = Environ$("TEMP") + "\"
template = ""
Set oitem = setdoc.Getfirstitem("AttachmentCert")
If oitem.Type = RICHTEXT Then
ForAll o In oitem.Embeddedobjects
Set eo = o
If eo.Type = EMBED_ATTACHMENT Then
template = path + eo.Source
If Dir$(template, 0) <> "" Then Kill template
Call eo.Extractfile(template)
Exit ForAll
End If
End ForAll
End If
' ...
result = path + "Certificate of Compentency for " + names + ".pdf"
Set rtitem = New NotesRichTextItem(doc, "License_Cert")
Call rtitem.Embedobject(EMBED_ATTACHMENT, "", result)
問題面する:私はそれを行うことができますどのようにリッチテキストフィールドに複数の文書を添付したい場合は?
私はこのコードを試してみたが、それは働いていない:
If doc.hasItem("License_Cert") Then
Set rtItem = doc.getFirstItem("License_Cert")
' Add a couple of lines to the rich text field before re-attaching the file
Call rtItem.addNewLine(2)
Else
Set rtItem = New notesRichTextItem(doc, "License_Cert")
End If
今では、同じ名前のフィールドを複製し、それは大丈夫でしょうか?
関連する行は 'Call rtitem.Embedobject(EMBED_ATTACHMENT、"、result) 'であり、" result "(添付するファイルへのパス)の値が異なるものを繰り返す必要があります。 .. –
これを使用してイメージをアップロードするだけです:add newline –