Has there been a change in the way Domino handles RenderToRTItem between R5 and 6?
Recently moved from R5.0.9a to 6.5.4. We had an agent that under R5 would create & send an email, containing a clickable button and an attached file, to a Notes user. But since the server upgrade, the button no longer appears on the email. It doesn’t work with either an R5 or 6 client.
It’s a very useful little application that gets files from our ERP system, reformats them into csv files, attaches them to emails & sends to nominated users. The nightly agent starts by checking a schedule of the files to be retrieved tonight, and the person they go to.
RenderToRTItem should (and did under R5) place a button in the email from a form that contains code to detach the csv file, open the file in Excel and do some basic formatting for the user.
Perhaps the person who wrote the agent for me made assumptions about using RenderToRTItem that are no longer valid in 6.
Maybe RenderToRTItem is a wild goose, and there are other agent issues. Any ideas about what might have changed since moving to Domino 6 would be greatly appreciated!
Subject: Now working, but not sure why!
After moving some lines around, including the lines where the email is saved, I got the script to work. Very strange, because it was working fine in R5. Perhaps rich text items behave differently in R6?
The section of script that now works is:
Set rtitem = New NotesRichTextItem(memo,“Body”)
Call memo.Save(True,True)
Call rtitem.AppendText(" — automatic email —")
Call rtitem.AddNewline(1)
varReturnCode = docButton.RenderToRTItem(rtitem)
Call rtitem.AddNewline(2)
Call rtitem.AppendText(“The attached file may be opened in Microsoft Excel by clicking the button”)
Call memo.Save(True, True)
Subject: RE: Now working, but not sure why!
Things like rich text processing, rendering, front end and back end interaction have all changed several times, sometimes even in point releases, such as a strange change in rfreshing that popped up in 5.0.3 and another change in 5.0.8 or so. Usually you can find a combination that works in both R5 and ND6, but it takes a little tweaking.
Subject: RenderToRTItem behaves differently in R6?
AppendRTItem would have been more appropriate, I think. RenderToRTItem is more of a “give me a snapshot of this document” function, while AppendRTItem actually copies the elements from one rich text field into another.