Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append DocLink in RTF

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I got some problems with appending a doc-link in a RTF. Here is my code:

Sub Click(Source As Button)

Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim docLink As NotesDocument
Dim rtitem As NotesRichTextItem

Set db = session.currentdatabase
Set uidoc = ws.CurrentDocument

ok = ws.DialogBox( "MyDialog", True, True, False, True, False, False, "Do your choice")
If ok Then
uidoc.Document.at_liefDocID = Left(uidoc.Document.choice_swl(0),32)
uidoc.Document.at_lagerStelle = Ucase(Right(uidoc.Document.choice_swl(0), Len(uidoc.Document.choice_swl(0)) - 33))
Set docLink = db.GetDocumentByUNID(uidoc.Document.at_liefDocID(0))
Call uidoc.Document.removeItem("at_docLinkLief")
Set rtitem = New NotesRichTextItem(uidoc.Document, "at_docLinkLief")
Call rtitem.appendDocLink(docLink, "MyDocLink is here")
End If
End Sub

By clicking on a button a dialogbox is opened. The user does his choice. The return value consists out of two other values which are separated by a tilde. The two values are extracted by some right and left operations.

The doc-link should appear in field "rtitem". Unfortunately nothing is seen. Also closing and opening the document has no use.

If I change EditMode in this click-event everything is ok, but this causes also a save. That's not what I want. The document should be saved explictly by the user.

What do I do wrong? Can anyone help me, please.

Any hint is highly appreciated.

Thanx in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top