Hi, I would like to add a text before paragraph with text and doc link. But, I lost the doc link, and have only the text.
Dim eDoc As NotesDocument
Dim rtitemA As Variant
Dim rtitemB As Variant
Dim rtitemC As Variant
Set rtitemA = eDoc.GetFirstItem(“Body”)
rtitemB.values = “An error occurred and the AES Xcell system could not notify " + + eDoc.SendTo(0) + " . Please forward this email to him” + Chr$(13) + Chr$(13)
Call rtitemB.AddNewLine( 2, True )
Set rtitemC = rtitemB
Call rtitemC.AppendRTItem(rtitemA)
Set rtitemA = rtitemC
Dim item As NotesItem
Set item = eDoc.ReplaceItemValue(“Body”, rtitemA.Values)
or
Dim rtitemA As New NotesRichTextItem(eDoc,“BodyOld”)
Call rtitemA.AppendText( “An error occurred and the AES Xcell system could not notify " + + eDoc.SendTo(0) + " . Please forward this email to him” )
Set rtitemB = eDoc.GetFirstItem(“Body”)
Call rtitemA.AppendRTItem(rtitemB)
Dim item As NotesItem
Set item = eDoc.ReplaceItemValue(“Body”, rtitemA.Values)
Do you have an idea why it’s not working?
P.S.
When I’m trying this:
Set rtitemA = eDoc.GetFirstItem(“Body”)
Call rtitemA.AddNewLine( 2, True )
Dim test As String
test = “An error occurred and the AES Xcell system could not notify " + + eDoc.SendTo(0) + " . Please forward this email to him”
Call rtitemA.AppendText( “An error occurred and the AES Xcell system could not notify " + + eDoc.SendTo(0) + " . Please forward this email to him” )
I have the doc ling and the new line at the end…
Thanks