Misc. Resources

Specified Mini-Lesson

MIDAS#15 Out of Notes Part 8: Integrating with Notes 9 and the Browser Plugin (Midas Rich Text LSX)

Out Of Notes, part 8: Integrating with Notes 9 and the Browser Plugin shows an easy way we can use the Midas V5 capsule views from inside either the IBM Notes 9 Social Edition client or the IBM Notes 9 browser plugin. The goal is a one click agent that creates a capsule MHT file.
The agents used for the demo are shown below. This agent will only work in Midas V5.00.

This extended sample requires Midas 5.00 or higher. If you would like to try out this sample, request an evaluation license, and specify that you want to try Version 5, and one will be mailed to you as soon as the new version is released.

AGENT: Open Selected in Capsule MHT
Dim ui As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim coll As NotesDocumentCollection
Dim doc As NotesDocument

Dim gcoll As New GeniiCollection

Set db = s.Currentdatabase
Set coll = db.UnprocessedDocuments
Set doc = coll.GetFirstDocument
While Not (doc Is Nothing)
   If gcoll.AddDocBackend(doc.Handle) Then
      Print "Added "+doc.StreetAddress(0)
   End If
   Set doc = coll.GetNextDocument(doc)
Call gcoll.ExportToMIME("c:\demo\DesignerHelp.mht", |Content-Type: text/html; charset="iso−8859‒1"|, |charset="iso−8859‒1"|, _
   |Capsule='Yes' RenderWithForm='Yes' charset="iso−8859‒1" PreserveTabs='8'|)
Call ui.URLOpen("file://c:/demo/DesignerHelp.mht", True)

Rough transcript (used for Closed Captions as well):
This is Ben Langhinrichs of Genii Software with a Mini-Lesson called Out of Notes Part 8: Integrating with Notes 9 and the Browser Plugin.

Switching to our desktop, let's open up IBM Notes 9 Social Edition. Once we're in there, we're going to open up the Designer Help database because that is a known, standard database. We've added an agent to this. I'll show you that in a little bit.

So, we do a search in here. We're going to search for "rich text programming". Let's see what that comes up with. It will come up with 46 documents. If we select those documents now we're going to run the agent. It's called "Open selected in capsule MHT".

Click on that and it opens up the capsule view in the embedded browser inside Notes. We can cycle through the different documents. This agent uses Midas Version 5, of course. We can cycle up and down, and again all in the integrated browser. So this is one way you can use the Midas 5 capsule views inside the Notes 9 client.

But another way is to go into the browser. This is the Firefox browser and we're going to open up the browser plugin. If you go in here, it's pretty much the same thing. We'll go into the Designer Help database in the workspace inside Firefox.

We'll do a different search this time. We'll search for "MAPI". It has fewer documents, 8 documents, so we're going to select those and and again run the "Open selected in capsule MHT" agent, and the only real difference is that it opens up in the Internet Explorer browser to view this, instead of the integrated browser. Just as before, we can see all the well-rendered documents that matched our search, but inside the browser.

If we switch over, we can look at what the code for this looks like. Basically, we just take each of the selected documents and add it to the collection and then call ExportToMime. At the bottom, you'll notice that we've used Capsule='Yes'. That just says it's going to be a capsule view and not integrated separately. Finally we do a NotesUIWorkspace.URLOpen and that just opens the MHT file we've just created.

That's an easy way to integrate with Notes 9 and the browser plugin.

Thank you very much.

Copyright © 2014 Genii Software Ltd. All Rights Reserved.