f



Extract text with style from rich text fields

Hi everybody, 

Somebody know how can i extract text with its styles (bold, tables,
pictures,etc) from a RicText field with LotusScript.

I use the method richtextField.AppendText(textOfRitem) but only the
text without his presentation is extracted. I put the extracted text
in other RichText field (to create a report of all documents present
in the base).

in the follow line, the method that i use: 

Forall ch_action In doc.GetItemValue("RTField")
  Call rtitem.AppendText(ch_action)
  Call rtitem.AddNewline(2)
End Forall

Thank you

Eric Mazzone,
0
eric
11/27/2003 10:00:10 AM
comp.lotus-notes.programmer 2966 articles. 0 followers. Post Follow

5 Replies
915 Views

Similar Articles

[PageSpeed] 36

Hi Eric,

a simple idea if you could use a client: open both documents in the the
client and use copy&paste to transfer the contents into the report.

--
*****************************************
Cheers!

Stefan
Stefan.DeutzmannNo@spaMgmx.de
(remove the No spaM from address, don't remove the @)
*****************************************


0
Stefan
11/27/2003 12:09:00 PM
"Stefan Deutzmann" <Stefan.deutzmannNO_SPAM@gmx.de> wrote in message news:<bq4pg2$1to7b1$1@ID-130239.news.uni-berlin.de>...
> Hi Eric,
> 
> a simple idea if you could use a client: open both documents in the the
> client and use copy&paste to transfer the contents into the report.

hi stefan,

But can I make it with lotusScript? automatically?

Because the action is called by a button that generat the report and
open it. The report is a form that contain a RTField and I extract the
content of a RTField in all documents to put it in the RTField of the
report.

Thank you.

EM
0
eric
11/28/2003 7:53:59 AM
Hi EM,

you can do it in LS:
- NotesUIWorkspace.EditDocument to open a document in editmode
- NotesUIDocument.GotoField to set the cursor into the source field
- NotesUIDocument.SelectAll to select all
- NotesUIDocument.Copy to copy the selection

Then use in the target document
- NotesUIDocument.GotoField to set the cursor
- NotesUIDocument.Paste to paste the earlier copied things

You can do this in a loop through several source documents. But it might be
slow.

--
*****************************************
Cheers!

Stefan
Stefan.DeutzmannNo@spaMgmx.de
(remove the No spaM from address, don't remove the @)
*****************************************


0
Stefan
11/28/2003 11:51:16 AM
Thank you I will try this method.

EM,
0
eric
11/28/2003 6:15:30 PM
What about this:

Dim nd1 As NotesDocument
Dim nd2 As NotesDocument
Dim nrti1 As Variant
Dim nrti2 As Variant

Set nd1 = nuid1.Document
Set nrti1 = nd1.GetFirstItem("RichText1")

Set nd2 = nuid2.Document
Set nrti2 = nd2.GetFirstItem("RichText2")

Call nrti2.AppendRTItem( nrti1 )


0
umerkle
12/10/2003 3:52:10 PM
Reply: