I need to create a form with a default image in a specific RTF Field. I tried with the method “Import” by notesuiDocument Class but the only way to import image is to have the image file locally.
Sub Postopen(Source As Notesuidocument)
Call Source.GotoField(“Body”)
Call Source.Import(“JPEG Image”,“c:\image.jpg”)
End Sub
Is there a system to import the image file from Shared Resources Image of database ??
Forget the LotusScript code. Create a configuration document – it can be a profile document – containing a rich text field that has the contents you want as the default field value. Then in the default formula of the rich text field, use @DbLookup (for a conventional document) or @GetProfileField (for a profile document) to read this stored value.
… or you can attach your default image in some configuration document, then let ls detach and import the image where needed. The advantage for this, is that you don’t need to be a designer to change this image afterwards.
I can understand that you don’t want to get the image from a file system location, it’s easier when it is in the notes database, but is there a particular reason why you want to get it from the image resources?
Read about profile documents in Domino Designer 6 A Developer’s Handbook – I believe there’s a pretty good discussion. They are really very simple to use.