Notesuidocument.Import Image

Hi,

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 ??

Thanks !!

Subject: Notesuidocument.Import Image

Try extracting the image to use to the users temp directory, before import.

Subject: RE: Notesuidocument.Import Image

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.

Subject: RE: Notesuidocument.Import Image

… 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?

Martin Vereecken

http://www.bizzybee.be

Subject: RE: Notesuidocument.Import Image

yes,if i use a local source, I’ll need to distribuite the image in every computer.

If i use a server source, when the user works out of office, the script’s code cannot found the image.

I never used a configuration document solution and I don’t know how works it.

Can you help me again?

Thanks!!

Subject: RE: Notesuidocument.Import Image

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.