Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Invalid RTF data on the clipboard
Feedback Type: Problem
Product Area: Notes Client
Technical Area: Application Development
Platform: Windows
Release: 8.5.3
Reproducible: Intermittent

Hi guys,

I have a signature database that takes text, and little image icons and saves to a HTML file.

Then in lotusscript, I import the HTML into a RTF field, copy it, then paste into the users mail file (using Rich Text when available or attachment if not)

There is a problem with rich text that I didn't have time to fix, whereby the signature would not show first time, but if you run the code twice, it then shows. (I remember reading something about RT fields and a common issue....

So I have the first button, which works and imports the HTML data, then identical code in the second button, which then gives the error.

Any idea's what causes this? Is it to do with the size of data I am trying to copy / paste etc? Or size limits on the field?

Main part of code attached.

Thanks for any pointers.




'If we are on version 8.2 or above, rich text signature's are available, so check if the field is
'available and use it if so. Otherwise use the attachment
richtext = Evaluate (|@IsAvailable(Signature_Rich)|,profDoc)

If richtext(0) = 1 Then 'Use Rich Text

profdoc.enablesignature = "1" 'autosignature
profdoc.signatureoption = "3" 'via Rich Text
Call profdoc.save(True, False)

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim myuidoc As NotesUIDocument '// this will be the calendar profile in the front end
Dim DummyUIDoc As NotesUIDocument '// this is the fake UI doc with a cloned RTF field on it
Dim thisDb As NotesDatabase

Dim DummyRT As NotesRichTextItem

Set thisDb = session.CurrentDatabase
Set myuidoc = workspace.editdocument(True,profdoc) '// get the Mail Profile document

Set DummyDoc = thisDb.CreateDocument
DummyDoc.Form = "dummyForm"
DummyDoc.SaveOptions = "0"

'Dummy doc used to import the HTML file, and the copy the contents out of the RT field
Set DummyRT = New NotesRichTextItem (DummyDoc,"Signature_Rich")
Call DummyRT.AppendText("")
Call DummyRT.Update

Set DummyUIDoc = workspace.Editdocument(True, DummyDoc)
Call DummyUIDoc.GotoField("Signature_Rich")

Call DummyUIDoc.Import("HTML FILE", HTMLFile)
Call DummyUIDoc.SelectAll
Call DummyUIDoc.Copy
Call DummyUIDoc.Close(True)

Call myuidoc.GotoField("Signature_Rich")
Call myuidoc.SelectAll
On Error Resume Next
'Clear any other signatures in the field and paste our imported stuff
Call myuidoc.Clear

Call myuidoc.Paste

Call myuidoc.Save
Call myuidoc.Refresh
Call myuidoc.Reload
Call myuidoc.Save
Call myuidoc.Close(True)

SuccessCheck = True


Feedback number WEBB96EH3U created by ~Sigmund Zekreskioni on 04/03/2013

Status: Closed
Comments:

Invalid RTF data on the clipboard (~Sigmund Zekres... 3.Apr.13)
. . What line is the error on (~Sean Eljumigon... 3.Apr.13)
. . . . Doesn't get there (~Sigmund Zekres... 4.Apr.13)
. . . . . . Try This (~Sean Eljumigon... 5.Apr.13)
. . . . . . . . Already doing it (~Sigmund Zekres... 8.Apr.13)
. . . . . . . . . . Turn off On Error Goto... (~Dan Kikiterobu... 8.Apr.13)
. . . . . . . . . . . . Call myuidoc.Paste (~Sigmund Zekres... 9.Apr.13)
. . . . . . . . . . . . . . Resolved (Workaround) (~Sigmund Zekres... 17.Apr.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS