Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs

Recent posts

Thu 17 Sep 2020

Exciton Boost - WYSI(hopefully)WYG

Tue 15 Sep 2020

Exciton Boost - Formula(s) for success

Tue 15 Sep 2020

Pushing harder at the limits of formulas

September, 2020
  01 02 03 04 05
06 07 08 09 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

Search the weblog

Genii Weblog

Making db link hotspots from your bookmarks (with Midas)

Thu 27 Apr 2006, 11:41 PM

by Ben Langhinrichs
Show and tell ThursdayThis came up as a request from the IBM Business Partner forum, but I thought I'd share it.  Alan Lepofsky asked:
After working with Notes at IBM for over a decade, I have several hundred DB icons on my Workspace.   I'd say I only use a dozen or so on a daily basis.

I'd like to dramatically clean up my Workspace, remove icons, even remove entire pages.   However, I know the day I do it is going to be the day I need "that link I was sent a few years ago about X".

I'm thinking an agent could scans all the tabs, and creates a document (or email) with links to all my DBs.   I can then save that document as a backup.

So, here goes.  This tip requires use of our Midas Rich Text LSX, but if you happen to already have it (a heck of a lot of people do, and probably a fairly high percentage of my readers, but if you don't, why not?):

Option Public
Option Declare
Uselsx "*lsxrtc"

Sub Initialize
   Dim session As New NotesSession
   Dim db As NotesDatabase
   Dim doc As NotesDocument
   Dim currentdb As NotesDatabase
   Dim newdoc As NotesDocument
   Dim view As NotesView
   Dim rtitem As New GeniiRTItem
   Dim new_rtitem As New GeniiRTItem
   Dim count As Integer
   Set currentdb = session.CurrentDatabase
   Set newdoc = New NotesDocument(currentdb)
   newdoc.Form = "Example Form"
   newdoc.Subject = "Bookmarks"
   Call new_rtitem.CreateBackend(newdoc.Handle, "Body")
   Set db = New NotesDatabase("", "")
   Call db.Open("", "bookmark.nsf")
   Set view = db.GetView("(All Bookmarks)")
   Set doc = view.GetFirstDocument
   count = 0
   While Not (doc Is Nothing)
      count = count + 1
      Call rtitem.ConnectBackend(doc.Handle, "URL")
      If rtitem.Everything.LinkReplicaID <> "" Then
         Print doc.Title(0)+":"+rtitem.Everything.LinkReplicaID
         Call new_rtitem.Everything.AppendLink(doc.Title(0), rtitem.Everything.LinkReplicaID)
         If count Mod=Then
            Call new_rtitem.Everything.AppendNewlines(0, True)
            Call new_rtitem.Everything.AppendNewlines(1, False)
         End If
         Print doc.Title(0)+":undefined"
      End If
      Set doc = view.GetNextDocument(doc)
   Call new_rtitem.Save
End Sub

Copyright 2006 Genii Software Ltd.

What has been said:

No documents found