Hi
I am appending values of one rich text field into another rich text field. But it is not saving. Below is the code
Set db=s.CurrentDatabase
Set view=db.GetView("Rich")
Set uidoc=ws.CurrentDocument
Set docA=uidoc.Document
Call uidoc.Save
If docA.hasitem("Body") Then
Msgbox "Item is there"
Else
Msgbox "Item is not there"
End If
Set rtitemA=docA.GetFirstItem("Body")
Set db1=s.GetDatabase("Domino7", "mail\dadminis1.nsf")
Set view1=db1.getview("($Drafts)")
Msgbox view1.EntryCount
Set docB=view1.getfirstdocument
If docB.hasitem("Body") Then
Msgbox "Item is there"
Else
Msgbox "Item is not there"
End If
Set rtitemB=docB.getfirstitem("Body")
If ( rtitemA.Type = RICHTEXT And rtitemB.Type = RICHTEXT ) Then
Call rtitemA.AddNewLine(2)
Call rtitemA.AppendRTItem( rtitemB )
Call docA.Save(False, True)
Call uidoc.Save
End If
Above code is placed in Post save event of Mail memo form.
Please suggest what I am doing wrong
Thanks
Subject: RE: Rich Text not saved !!! Urgent !!!
As described in the Update rich text tip, rich text fields, unlike other types of fields, do not get updated in the front end (uidoc) when you change them in the back end (notesdocument).
Subject: RE: Rich Text not saved !!! Urgent !!!
But I have other code of designer help which is working fine Set uidoc = w.CurrentDocument
Set docA = uidoc.Document
Call uidoc.Save
Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitemB = docA.GetFirstItem( "Body1" )
If ( rtitemA.Type = RICHTEXT And _
rtitemB.Type = RICHTEXT ) Then
Call rtitemA.AddNewLine(1)
Call rtitemA.AppendRTItem( rtitemB )
docA.SaveOptions = "0"
Call docA.Save(False, True)
Call uidoc.Close
End If
on button click. What should I do?
Is there any way that I can put
Text in computed rich text field. I have entered this string in fields value thru designer but when I open the form and It is showing HTML also. Is there any other way? I do not want to put this html on
Purpose of doing all these are, to display a image with text at the bottom of the mail body so that this message will also send. This message and image is infomatory message example—Save Paper, Save Power etc.
This message should append every time when user is mailing or replying with history to any mail
Plz suggest
Subject: RE: Rich Text not saved !!! Urgent !!!
Yes, because this example code makes a change to the back-end NotesDocument, then saves the back-end document. You are saving the front-end document. That’s the difference.
Subject: RE: Rich Text not saved !!! Urgent !!!
In my opinion it would actually save power (and potentially paper, because there are still those who print out all their mails) to not waste bandwidth for such crap …
… but if this is a management idea …