Tip #3: displaying graphics in Notes client views


Oh this is so simple. It’s one of those things that you try out thinking, “this’ll never work.”

So you can imagine the pain I felt in my backside when I fell of my seat with a mighty whallop when the code actually worked.

First time!

I’m sure plenty of others have done stuff like this… Lotus / Iris pretty much let the cat out of the bag when they launched the R5, with the bookmarks database. The bookmarks database has a number of hidden views (what? You don’t know how to get to hidden views? Hold down CTRL and SHIFT when selecting Go To… from the View menu — there, two tips for the price of one!) in it, and a few of them show the relevant database icon followed by the database name.

OK, OK, show me the money!

The code is stupidly simple. So much so, I couldn’t justify attaching it to this document as a separate download / LSS file. So, without further ado, here it is, in its simplest form:

Dim doc As NotesDocument
Dim item As NotesItem

' // Set your doc object first, then do this:
Set item = doc.GetFirstItem("rtImage")
' // Where our rich text field is called "rtImage"
item.IsSummary = True
Call doc.Save(True,True, True)

So how does it work?

Put simply, Notes uses a certain flag, visible from the document properties infobox when scanning fields, to determine whether a Notes item (i.e. field) is accessible from a view. Rich text is classed as “non-summary” data… change this state of affairs and you have a solution. ’Tain’t rock solid mind, as anyone observing the disappearing database icons in the bookmarks database will attest!

Additional information / links

Check out Peter Leugner’s database, linked below, that makes use of this trick (the link’s over at the LDD Sandbox). In addition to the download, there’s also a comment about an alternative technique re getting graphics into views.

Further reading

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.