"Automatic" PassthruHTML?

Hi!I’m building a application that will be used both in Notesclient and browser. I’m using CSS both in client and Browser.

I would like to have a action that would append some PassthruHTML where the cursor is placed into a RTF-field when a user clicks a button. The action will be used only in client where all the documants are created.

Ex.

I have tried using RichTextStyle but can’t get it to work.

Anyone that have done something like this??

Any help is much appreciated.

/Jocke

Subject: “Automatic” PassthruHTML??

From Notes-Designer-Help:

Read-write. HTML attribute as listed below.

Note This property is new with Release 5.

Defined in

NotesRichTextStyle

Data type

Boolean or constant of type Integer

Note The data type is Long for COM.

Syntax

To get: flagIntegerConstant = notesRichTextStyle.PassThruHTML

To set: notesRichTextStyle.PassThruHTML = flagIntegerConstant

Legal values

True (-1) for passthru HTML.

False (0) for non-passthru HTML.

STYLE_NO_CHANGE (255) to maintain the previous state (default).

Usage

HTML text may be embedded in a NotesRichTextItem by setting this property and then calling the AppendText method. These attributes are useful when the document is served up to the Web. The text may be visible or invisible when displayed by the Domino Designer Editor, controlled by View options.

Is this, what you are looking for?

Subject: RE: “Automatic” PassthruHTML??

Hi Thomas. Thanks for your response.

Yes I have tried using that but can’t get it to work.

The problem is that I want the text/PassThruHTM to be inserted in the TRTF-field while the user is editing it an clicks tha action.

/Jocke

Subject: RE: “Automatic” PassthruHTML??

Following Stan Rogers, I found this code. It is from http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/a2bb7f988f61ca6c852574c90056cce0?OpenDocument and it does work!

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim body As NotesMIMEEntity

Dim header As NotesMIMEHeader

Dim stream As NotesStream

Set db = s.CurrentDatabase

Set stream = s.CreateStream

s.ConvertMIME = False ’ Do not convert MIME to rich text

Set doc = db.CreateDocument

Call doc.ReplaceItemValue(“Form”, “Memo”)

Set body = doc.CreateMIMEEntity

Set header = body.CreateHeader(“Subject”)

Call header.SetHeaderVal(“MIME message”)

Set header = body.CreateHeader(“To”)

Call header.SetHeaderVal(“john.doe@mydomain.com.br”) 'mail to recipient here

Call stream.WriteText({Click here for CNN})

Call body.SetContentFromText _

(stream, “text/plain;charset=UTF-8”, 1726)

Call doc.Send(False)

s.ConvertMIME = True ’ Restore conversion

End Sub