Solved

Rich Text Fields from One Doc to Another

Posted on 2001-07-20
2
469 Views
Last Modified: 2013-12-18
In Lotus Notes design ...  I am trying to bring in data from fields in one doc to another (by unique docid) using an action button which has this code below.  This brings in the data sucessfully for Category but not for Body.   The only difference is that Body is a Rich Text field, while Category is not Rich Text.    How do I get a Rich Text field from one doc to another?   Thanks.

REM "The Unique ID field point to doc that houses the template.";
FIELD Body     := Body;
FIELD Category := Category;
@SetField("Body";    @GetDocField("2E02E270D58FA62286256A8F005937DF"; "Body"    ));
@SetField("Category";@GetDocField("2E02E270D58FA62286256A8F005937DF"; "Category"))
0
Comment
Question by:blyons48
2 Comments
 

Accepted Solution

by:
puneetfred earned 100 total points
ID: 6303321
This is given in Notes help. pls see below:

Examples: AppendRTItem method

This script takes the Body item on document B and appends it to the end of the Body item on document A. The Body item on document B is deleted using the Remove method defined in NotesItem.

Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitemA As Variant
Dim rtitemB As Variant
'...set values of docA and docB...
Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitemB = docB.GetFirstItem( "Body" )
If ( rtitemA.Type = RICHTEXT And _
rtitemB.Type = RICHTEXT ) Then
  Call rtitemA.AppendRTItem( rtitemB )
  Call rtitemB.Remove
  Call docA.Save( False, True )
  Call docB.Save( False, True )
End If
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6303413
Your formula will work if you do that from an action/agent from view by selecting the document where you want the contents to be transfered. @getdocfield for Rtitem will not work in UIdocuments. It will work only for backend document. Even the script will append the rtitem, but you have to save and close and reopen the document for the richtext to realize.

~Hemanth
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now