Thursday, November 30, 2006

new hardware - Rosewill R913E (LCD) and Biostar V760GS51 (video card)

Last week I decided to upgrade my computer to a dedicated video card. While I was at it I decided to also swap out my old ViewSonic 19" CRT for a new LCD monitor. Trying to select either of these components can be an overwhelming experience. I started out on Tom's Hardware to get some basics, then on to Newegg to find something I could afford.

First up, a decent video card. I have an Asus motherboard which has an onboard GeForce 6 GPU. That has served me fine for a few months, but it uses shared memory and I've gone back to playing some games and this lack of power shows. Also, with Vista having such insane requirements I wanted something more powerful. I had the following requirements: short card form factor with a small heatsink (since I'm using a really small case), PCI-Express 16x, DVI, dual monitor support (a future upgrade), and under $150. Oh, and it had to be quiet. I've made a lot of compromises to make my computer nearly silent and I didn't want a graphics card that sounded like a jet engine ruining all my hard work.

Combining the advice from Tom's with my requirements and budget I found the Biostar V760GS51. It uses the 7600GS chipset, which isn't the latest and greatest, but it has all the features I was looking for and performs extremely well for the $125 I paid. With 512MB RAM it should not only support Vista Aero, it should do it with ease. It barely fits in my case, with maybe 5mm to spare between the end of the card and my hard drive. It's so quiet I can't even tell I added it, which surprised me. It can be overclocked and even includes special software to do that, but I've never been a fan of overclocking anything and it performs well enough without it. It's also SLI-capable (my motherboard isn't), so if you're in the market for low-cost SLI give this card a look.

Then I went looking for an LCD. This was tougher, since I had specific requirements and I wasn't willing to compromise. I wanted a 19" screen, DVI, at least a 8ms response, and native resolution had to be 1280 x 1024. That's the smallest resolution at which I can still read text comfortably, and running LCD's at a non-native resolution causes blurring or graininess in the picture.

I found the Rosewill R913E, which is a 19" monitor with 4ms response. The list price is $240, which isn't bad, but you can get a $60 mail in rebate if you purchase before 1/31/2007! This monitor for $180 is an absolute steal, so much so I'm considering getting a second one. A height adjustment would be nice, the stand is a little cheap, and it's a little bright out of the box, but overall... ooh la la! No ghosting in anything, ever. The CPU and GPU stutter but the monitor has no problem keeping up.

Here is my current setup:

Case - Antec Aria
Motherboard - Asus M2NPV-VM
Memory - 2GB DDR2-533
Hard drive - Seagate 7200.10 (160GB SATA-2)
DVD - Sony DWQ 120A
Video - Biostar V760GS51
Monitor - Rosewill R913E

recent CD purchases

I still buy CD's because I think the entire body of work conveys the artist's message. Here are some of my more recent purchases and my thoughts on them.

Daughtry - Chris Daughtry - The American Idol hopeful who should have won. It's a great CD, full of the passionate vocals Chris displayed on TV. Definitely one of my favorites. I have the final track, What About Now in my favorite playlist.

Awake - Josh Groban - The voice is still amazing, but this one lacks substance to me. Way more artsy than previous releases, with some interesting collaborations with Ladysmith Black Mambazo, but overall it just doesn't work for me. I find the pieces in Italian on this CD to be annoying, where I found the ones on previous releases to be intriguing.

The Open Door - Evanescence - Amy Lee's voice is still luscious and the lyrics are great, but every track is overproduced. Amy has an incredible vocal range; unfortunately she went Mariah Carey with it. Just because you can hit 5 or more octaves doesn't mean you should do it in every song. The current radio release, You Never Call Me When You're Sober is so different from the rest of the CD it sounds like it's another group entirely.

Coming up next: An Other Cup, the first pop release by Cat Stevens since he changed his name to Yusuf Islam 28 years ago; and Siempre, the latest from the opera group Il Divo.

Tuesday, November 28, 2006

Notes MU Migrator download - CORRECTED LINKS

Here's the minimal version with just the EXE and the INI files:

Notes Migrator - 05 -

If you want the documentation, which is pretty sparse at the moment, you can get it here:

Notes Migrator 05.doc

Sorry about messing that up earlier, the link with the source code is disabled now. I'm working on a UI to configure the application INI, as well as adding more additional debugging and logging. That should be up by the end of the week.

Monday, November 27, 2006

Notes MU Migrator 0.5 available

[UPDATE 27-3-2012] - IBM now has an officially supported tool:

This is a utility that will take multiple single user installs and migrate them to a multi-user install. The general premise is that each user's Notes data directory is stored on his/her home drive (such as h:) and this will move the files to the appropriate %UserProfile% folders to make it work with the multi-user installation. I did this specifically for our own Windows Terminal Services servers, but there is no reason this shouldn't work for shared workstations, too. Just as long as Notes was originally set up a single user installation and each user had their data directory stored elsewhere, this should make it easier to migrate them to a multi-user install.

Here is the [EDIT - link removed 11/28/06]
Here are the VB5 runtimes if you need them.

I have tested this in my own environment and it worked well, but your mileage may vary. If you get any errors or need any help either post a comment or e-mail me and I'll do my best to help. Also if there are any features you would like to see added let me know. If there is enough interest I would also be willing to release the source code.

Wednesday, November 22, 2006

Domino on Linux tunekrnl overflow vulnerabilities

Just in case you missed it.

Joel on Software: Choices = Headaches

Nathan Freeman pointed out this article to Mary Beth Raven on her blog and I was simply astounded by what it contained. Here is someone whom I believe is relatively well-regarded in the software development world who is 1) willing to challenge Microsoft's doublethink and 2) agrees with my own approach. It's not common for my views to be popular so I'm always surprised when anyone agrees with me.

Joel discusses the confusing mess surrounding simply turning off Windows Vista. He tallied over fifteen different ways, then describes how to pare it down to only two. This can very easily be correlated to software development in general.

How many preferences are there in Lotus Notes? Well, that depends. There are up to six different sets of preferences, plus the ones built into the mail file itself. Each one is broken up into multiple tabs and subtabs, and some such as Toolbar Preferences have a completely unique UI paradigm for making changes. In all there are over 130 decisions to be made just in File > Preferences > User Preferences in Notes 7.01, and that's not counting all the combinations of port settings and International dictionary settings.

Nathan has long supported the idea of radical simplification in the Notes client, and I'm with him all the way on that charge. For my users their single biggest complaint is not that the Notes client is ugly or slow, it's that it is simply overwhelming. That criticism is mostly based on their use of Notes as a mail client. In my own applications I keep it as minimal as possible, such as the following

barracuda spam stats
[Side note: That's based on my own "blue rinsed" standard application template.]

It could be argued that some applications need more functionality and can't be as barebones as this. I challenge that assertion. The issue isn't that the functionality isn't needed, it's that the functionality should only be presented when and where it is needed.

As a real world example, create a Reply to an e-mail message. Using the standard Notes 7.01 DWA template, the action bar in the response has Reply to All and Follow Up actions. What on Earth do those mean in this context? If I wanted to Reply to All I would have done that from the view. Is the Follow Up flag getting put on the original message or my response? Why would I want to do that from here, anyway?

Also, the vectors for accessing functionality should be presented in the fewest places possible. How many different widgets are there related to Instant Messaging in the Notes client using the integrated instant messaging?

  • Right-click context menu
  • Chat view action (with multiple subactions)
  • Instant Messaging toolbar
  • Instant Messaging statusbar
Am I the only one who finds this ridiculous? By the way, the one vector I couldn't find was a direct keyboard shortcut. You can use Shift+F10 to open the context menu, which comes up in an odd place, or use Alt+A to open the Actions menu then H to open the Chat submenu.

I applaud Joel for tackling the issue of overloaded software that tries to please everyone but ends up bewildering the majority. And I also appreciate Nathan for keeping the pressure on the Notes 8 design team to simplify while innovating. I sincerely hope that goal is met.

Monday, November 20, 2006

Postsecret needs your help

PostSecret is an ongoing community art project that allows people to share their secrets anonymously. People send in postcards with their secrets and Frank Warren, the site owner, posts a selection of them each week. More information about how it works can be found at the site.

The PostSecret blog has had over 50 MILLION visitors in the past two years and Frank has always maintained the site ad-free. He contends, and I agree, that by keeping it free of advertising it makes people want to open up and share. Ads would taint the image, making it appear like a commercial venture instead of the helpful outlet it truly is.

Frank has taken some of the postcards and created some wonderful books. He also teamed up with Amazon to help further offset the costs of running the site. For every purchase you make with this link, Amazon will donate 10% of the proceeds to the PostSecret Project. If you're going to be buying from Amazon anyway, please take a moment to do it with this link. It doesn't cost you anything and it helps continue a very worthwhile project.

Lotusphere session breakdown - take 2

I recounted the Lotusphere sessions and here are the updated numbers.

Portal                    31  16.4%
Workplace 10 5.3%
Notes 8 27 14.3%
Expeditor 4 2.1%
Lotus Component Designer 6 3.2%

All the Websphere sessions mentioned Portal so I lumped them together. I also broke out the Lotus Component Designer sessions separately.

Recounting the Notes and Domino 8 sessions proved difficult because many of the session titles don't explicitly say they are covering Notes 8. For example, AD504 - What's New in the IBM Lotus Domino Objects? is actually focusing on what's going to be new in Notes 8, not what is new in Notes and Domino 7.02. You have to read the abstract to figure this out. I didn't find the "dozens" of Domino 8 sessions Ed mentioned in a comment to my previous post, so it is likely that much of the Futures and Innovations and Planning and Managing You Collaboration Infrastructure tracks will include significant R8 coverage, it's just not stated in the session titles or abstracts and therefore I have no way of counting those.

My methodology is likely highly flawed and my numbers are likely off. The point of this exercise was twofold. First, to highlight the significant amount of sessions that are focused on either Portal or Notes 8. Second, to ask the question is this truly the content customers are asking for?

I'm not complaining, there is a lot of good content that will keep me very busy. I'm just shocked to see more than 30% of the sessions devoted to a new Notes version and to a product that no one I know uses. My experiences could very likely be different from the norm.

Sunday, November 19, 2006

What is Lotusphere's focus?

Ed announced the Lotusphere 2007 sessions are posted. As I read through them I was struck by how much coverage there was for Websphere, Websphere Portal, Lotus Component Designer and Workplace products as well as Expeditor and Notes 8 that aren't even released yet. Here's how it breaks down:

Total sessions       189
Websphere sessions 7 3.7%
Portal sessions 27 14.3%
Workplace sessions 9 4.8%
Notes 8 sessions 20 10.6%
Expeditor sessions 4 2.1%

Since Lotus Component Designer components can be deployed on Websphere or Portal I chose to include them with Websphere. Portal's numbers were already high enough.

What is Lotusphere's focus? What is the target audience?

Friday, November 17, 2006

Ballmer: Linux users owe Microsoft

November 16, 2006 (Computerworld) -- In comments confirming the open-source community's suspicions, Microsoft Corp. CEO Steve Ballmer today declared his belief that the Linux operating system infringes on Microsoft's intellectual property.

It is rather ironic that the company most sued for IP infringement is now claiming Linux infringes on theirs. Further down in the article:

Jones (Pamela Jones, editor of the blog) also challenged Ballmer to "put his money where his mouth is" and detail exactly what part of the Linux kernel source code allegedly infringes upon Microsoft patents, so that "folks will strip out the code and work around it or prove his patent invalid."

Ballmer did not provide details during his comments today. But he was adamant that Linux users, apart from those using SUSE, are taking advantage of Microsoft innovation, and that someone -- either Linux vendors or users -- would eventually have to pay up

This is sounding a lot like the SCO v. IBM case.

Wednesday, November 15, 2006

SNTT - Follow up to "Calling an agent using RunOnServer when saving a new document"

In my previous post I called doc.Save in the PostSave event to force the NoteID to update. This was so I could pass it to NotesAgent.RunOnServer. In the comments to that post David Bohlin suggested I run the agent code in QueryClose instead, with the understanding that the NoteID is populated by the time QueryClose executes.

I did some testing and that is not the case. Try this:
Sub Queryclose(Source As Notesuidocument, Continue As Variant)
Msgbox Source.Document.NoteID, 0, "Queryclose NoteID"
End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at

In my testing the NoteID was always 0 for a new document. The only way I was ever able to get it to update the NoteID was to call Source.Document.Save.


Monday, November 13, 2006

Rod Boothby - Updated Simple Recipe to Get Off Lotus Notes

Here are Rod's latest thoughts on a subject I was sure he would have grown tired of by now:

Updated Simple Recipe to Get Off Lotus Notes
  1. Screen scrape all static content. You could use some Notes APIs, but why bother finding someone who learnt Notes back when it came out in 1984?
  2. Have end users rebuild all your Notes based applications using QED Wiki, or something similar, such as Teqlo.
Step one might be even easier if your Notes team has set up standard compliant feeds, such as RSS or ATOM for your static content. With a system such as iUpload, Blogtronix, Suite Two or Atlassian's Confluence, it is a small coding exercise to bring your existing content into a new system.

Nope, he still doesn't get it. I would write him off if he weren't in a position where he influences so many decision makers.


I was reading Rod Boothby's blog and he mentioned this new technology from IBM. From the developerWorks Emerging Technology blog:

QEDWiki is a platform for collaboration

  • Lightweight standards based collaboration environment
  • Unstructured to Structured Data Definition
  • Enables personal publishing

QEDWiki is a runtime for aggregated services:

  • Dynamic platform for integrating “live” data
  • Personalization in consumption of external services
  • Application Concept (navigation, menus, install, config)

QEDWiki is an IDE for users to build ad-hoc applications:

  • Consumes SOA services via Wiki markup
  • Flexible visual drag-drop and markup based application development features
  • Enable mark-up based client development
Here's a demo of QEDWiki in action.

And a follow up article from Zend's Developer Zone.

This, combined with the IBM Application Designer for Medium Business, shows a concerted move by IBM that mirrors Microsoft's recent announcements (via Gregg Eldred). There appears to be a desire to push application development down to the masses and I'm not sure where that's coming from.

The concepts are great, I just find the hype overwhelming. You can't force such a fundamental change through, it takes time. It seems like the analysts who sit on the sidelines want this to be the new new thing so they can be proven true in their predictions, but those of us in the trenches really want to take it slowly to avoid disasters.

I spent most of the 1990's cleaning up non-programmers' attempts at application development in Visual Basic and Access. Time will tell whether this is a good thing or not.

Friday, November 10, 2006

IBM alphaWorks: Application Designer for Medium Business

I found this on alphaWorks a few days ago and downloaded it, and only got around to installing it today. From the alphaWorks website:

What is Application Designer for Medium Business? Application Designer for Medium Business bundles together two technologies: a pre-release of Lotus® Component Designer 6.0 and WebSphere® Application Server, Community Edition (WAS CE) 1.1. Lotus Component Designer is an Eclipse-based Integrated Development Environment (IDE) that helps non-Java developers to create database-driven Web applications for an IBM WebSphere Portal 6 environment. The use of Application Designer for Medium Business enables Lotus Component Designer to be deployed to WAS CE. In addition, Lotus Component Designer provides four sample applications to help users get started quickly and understand what a typical application looks like.

That sounds like it's right up my alley, considering I have no clue how to do anything with Java. However, what is delivered doesn't quite live up to the promise. Installation is extremely simple, just double-click and follow the prompts. When you're done a webpage is loaded that outlines the next steps and helpfully suggests creating a simple application and deploying it. I'd love to, but I can't figure out how.

After loading the WAS CE server, which took a while, I double-clicked the Lotus Component Designer icon. After that finally loaded the initial window is pretty, but I'm not sure what to do with it:
I moused over the various graphics and clicked the Tutorials button, which is the one with the green check mark.

I clicked the first one: Create an IBM Lotus Component Designer component. The tutorial opened in a separate window with a rather strange layout:

There are no navigation hints at this point, you have to expand the section under the "Getting started" bit to get to the real meat of the tutorial.

You'll notice there are now Previous and Next links on the pages. Okay, now that that bit of insanity is behind us, let's get down to it. Lesson 1 says:

To create a component, perform these tasks:

  1. Open Lotus Component Designer.
  2. Click File > New > Component.
  3. In the IBM Lotus Component Designer - New Component dialog box, type Designer Tutorial in the Name field.
  4. In the Description field, type This component is for the Lotus Component Designer tutorial.
  5. Keep Start with blank component selected.
  6. Click OK.
The Designer Tutorial component is listed in the Designer Navigator.

I follow the instructions, my hard drive runs like crazy for about 3 minutes, and then I'm back at the Tutorial list. I can't find the Designer Navigator anywhere. It's not listed in any of the menus and no new tab was loaded, so I have no clue where the component went. After several minutes digging around I got frustrated and gave up trying to find the Designer Navigator.

Instead I decided I'd load one of the sample applications, which the website promised would "help users get started quickly and understand what a typical application looks like." I clicked the Samples button on the Welcome page (it's the collection of shapes) and a list of several samples is provided. No matter which one I select all I get is a help page telling me about the sample. I can't figure out how to actually load the sample and the help doesn't tell you. Going to the menu and selecting File > Open doesn't do anything, so I'm at a complete and utter loss.

And with that, my review is done. I can't actually do anything with Lotus Component Designer and the information in the tutorials is inaccurate or lacking in enough detail to be useful to complete beginners. I think if I knew how to use Eclipse I wouldn't be so frustrated or feel so helpless, but this is supposedly geared toward people with no experience using the tools. As such I find it an utter failure. I have Eclipse for Dummies at home and I'll read it this weekend, then report back.

Thursday, November 09, 2006

SNTT - Calling an agent using RunOnServer when saving a new document

Enough of the politics, let's have even more RunOnServer fun! Let's say that when a user saves and closes a document you want to update the newly saved document with information from an agent. RunOnServer takes a NoteID so it looks like a no brainer. In reality it proved to be more a little more difficult.

The first hurdle: I started out using the QuerySave event and the NoteID was always 0. I dug into the Notes.Net developerWorks Notes forum and learned that the NoteID doesn't exist until the document is saved to the hard drive. Okay, I'll use the PostSave event. Since it's called "PostSave" I expected the document to be saved to disk. Well, either it isn't or the PostSave event occurs before the NoteID is populated. The solution: force the document to save from PostSave. I'm not sure why this forced save is necessary, but it works. Calling doc.Save from QuerySave gave a save conflict warning, but calling it from PostSave doesn't.
Sub Postsave(Source As Notesuidocument)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Dim doc As NotesDocument

Call Source.Document.Save(True, False)
Set doc = Source.Document
Set db = session.CurrentDatabase
Set agent = db.GetAgent("Process Service Fees")

If agent.RunOnServer(doc.NoteID) <> 0 Then
Msgbox "There was an error and the service fee notice was not sent.", 48, "Service Fees"
End If
End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at


Wednesday, November 08, 2006

It's official: I'm a second class citizen

It all started on May 1, 1991 with the case of Baehr v. Lewin. The state of Hawaii was sued by same-sex couples to be allowed to get married. Fast forward to 1996, and the so-called Defense of Marriage Act was signed into law. I'm not sure what it defended, but it did allow states to not recognize marriages that were legal in other states, for the first time in our country's history.

Yesterday South Carolina Amendment 1 passed by a landslide. A previous law introduced in 1996 already established the definition of marriage as being between one man and one woman. This goes a step further by preventing civil unions of any type. It is an obvious attempt to forestall legislation that would allow same sex civil unions.

I'm reminded of Martin Niemoeller's poem First they Came...
They came first for the Communists,
and I didn't speak up because I wasn't a Communist.
Then they came for the Jews,
and I didn't speak up because I wasn't a Jew.
Then they came for the trade unionists,
and I didn't speak up because I wasn't a trade unionist.
Then they came for the Catholics,
and I didn't speak up because I was a Protestant.
Then they came for me,
and by that time no one was left to speak up.

* This version is from the New England Holocaust Museum.
I wonder what they'll brand me with when they put me in a camp?

Tuesday, November 07, 2006

SNTT - Updating a UI document from an agent called with RunOnServer

Here's a technique to run an agent on the server, close the UI document, and have it reopen showing the updates done in the agent. In this case my agent is issuing LC LSX calls to update data from DB2. The following code is in a Hotspot button on the document. The tricky part here is knowing to use Delete on the NotesDocument. You have to delete the document from the object cache after the agent runs to force it refresh when you reopen it.
Sub Click(Source As Button)
Dim uiws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim db As NotesDatabase
Dim agent As NotesAgent
Dim doc As NotesDocument
Dim noteid As String

Set uidoc = uiws.CurrentDocument
Call uidoc.Save

Set db = uiws.CurrentDatabase.Database
Set agent = db.GetAgent("Get Account Info")
Set doc = uidoc.Document
noteid = doc.NoteID

If agent.RunOnServer(doc.NoteID) <> 0 Then
Msgbox "There was an error looking up the account information.", 48 _
, "New Account Setup"
End If

Call uidoc.Close(True)
Delete doc
Set doc = db.GetDocumentByID(noteid)
Set uidoc = uiws.EditDocument(True, doc)
End Sub

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at


Monday, November 06, 2006

HBO: Hacking Democracy

The e-voting systems in use throughout the US are proprietary and are not reviewed by independent security analysts. We have to take the vendors' word that the information is secure. As dramatically illustrated in HBO's expose, that is emphatically not the case.

The most widely used e-voting systems are provided by Diebold. First the team went into the Diebold General Elections Management System (GEMS) and altered results. Diebold said this was not possible without creating an audit trail, but nothing the team did produced an access log. They were able to alter results in a number of ways. Speaking of access, votes are stored in a Microsoft Access database. I am very familiar with Access' security, but I also know from personal experience that it can be circumvented and as shown in this documentary, it doesn't take a knowledgeable person very long to do it.

As a final test, the team successfully altered the results of a mock election by directly altering the memory card used in the voting machine. According to Diebold it is not possible. The security analyst only touched the memory card for the voting machine prior to it being inserted in the machine. He never touched the machine itself, nor did he have access to the card after it was put into the machine. When the voting machine came up it printed a 0 total report, showing that there were no votes already in the unit. 8 total votes were cast, 6 were "No", 2 were "Yes", then a final tally was printed. It showed 7 "Yes" and 1 "No".

To verify these were actually recorded results and not just the result of altering the report, they loaded the results into GEMS. It showed the altered results. According to Diebold this is absolutely not possible. In reality, it absolutely is. This is the most likely way that John Kerry ended up with negative votes in some Florida counties in 2004.

Friday, November 03, 2006

SNTT - Saving a text file to an iSeries and processing it with LotusScript

Working with the iSeries platform has its own challenges. One of them is if you create a mail-in database that accepts attachments and you need to process them. Saving the attachment to the file system then processing it shouldn't be that big a deal, but on an iSeries it is. By default the file is saved as EBCDIC, while LotusScript expects it to be ASCII. Doing the conversion isn't really difficult, but it does take some fiddling around to figure out all the bits to flip. Here's how:
Shell("COPY OBJ('" & EBCDICFileName & "') TOOBJ('" & ASCIIFileName & "') _

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at


Wednesday, November 01, 2006

SNTT - Replacing tokens in Rich Text and preserving styles

A fairly common thing in Notes is to create a form with a Rich Text field so users can produce standard letters. To achieve this people often use tokens that later will be replaced in an agent, such as [DATE] or [ACCOUNT NAME]. Typically this is fairly easy, but there some instances where it gets tricky. What if you want the text that replaces a token to be in the same style as the token, such as a specific font, font size or color? And what about replacement text that spans multiple lines? Here is a function that will take care of it for you.
Sub ReplaceToken(Byval Token As String, Byval Replacement As String, _
RTBody As NotesRichTextItem, NewLineChar As String)
Dim rtNav As NotesRichTextNavigator
Dim rtNavEnd As NotesRichTextNavigator
Dim rtRange As NotesRichTextRange

Dim linelength As Integer
Dim oneline As String

Set rtNav = RTBody.CreateNavigator
Set rtRange = RTBody.CreateRange

If rtNav.FindFirstString(Token) Then
'Mark the original token so you can delete it later
Call rtRange.SetBegin(rtNav)
Set rtNavEnd = rtNav.Clone
Call rtNavEnd.SetCharOffset(Len(Token))
Call rtRange.SetEnd(rtNavEnd)

'Preserve the existing style. This gets a little convoluted.
' 1) The style is associated with a NotesRichTextRange.
' 2) You have to BeginInsert before you can AppendStyle.
Call RTBody.BeginInsert(rtNav)
Call RTBody.AppendStyle(rtRange.Style)

'Break up multiple lines (assumes a single character delimiter)
linelength = Instr(1, Replacement, NewLineChar)
Do Until linelength = 0
oneline = Left$(Replacement, linelength - 1)
Call RTBody.AppendText(oneline)
Call RTBody.AddNewline(1)
Replacement = Mid$(Replacement, linelength + 1)
linelength = Instr(1, Replacement, NewLineChar)

'Add the final line of replacement text, or the only line if there are
' not multiple lines of replacement text
Call RTBody.AppendText(Replacement)
Call RTBody.EndInsert

'Delete the original token.
Call rtRange.Remove
End If

Set rtRange = Nothing
Set rtNav = Nothing
Set rtNavEnd = Nothing
End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at

See, I do write code sometimes! :-)