I have a form which after the user has clicked lots of choices and selected from drop down, an agent the creates a dynamic text in a rich text field using mainly @Command([EditInsertText] based on what was originally entered. This works really well. Is there a similar command which I can use to attach an image from another document stored on the same database?. Or how is it possible to write a link to an image on a website so the when the document is opened the image is loaded.
The database is permantantly connected to the web. Thankyou in advance
Subject: import an image into a lotus notes rich text field programmatically
If you are using [EditInsertText], then you are working with the Rich Text field in the Notes user interface. When you write “attach an image”, I suppose you do not really want to make an attached file – you want the image to be visible in the document.You can use Windows API calls to simulate keystrokes that open the other document, copy the image to the clipboard, and paste it into the first document. There is an example here for another purpose that you might be able to adapt.
If you are prepared to insert the image in the document’s data directly (not through the user interface), then there are a lot of possibilities. The simplest is to use AppendRTItem to append the item from the other document. When you change Rich Text in this way, the changes do not appear in the user interface until you reopen the document.
Subject: RE: import an image into a lotus notes rich text field programmatically
The only question here is how current does the image need to remain? what if the original source image changes? does it need to be updated anywhere else it is used? I think this I why I might prefer a linking method, but it all DOTS.
Subject: import an image into a lotus notes rich text field programmatically
I would think it would be better to link to an image than store it multiple times. The key is that it is stored as an attachment and not in a richtext field so you can easily get a handle on it.
Otherwise, look at MIDAS from www.gennisoft.com. Ben may have tools there that help you.