Skip to main content
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum



Solution -- Programmatic Rich Text Field Manipulation in Script
Nathan Chance 3.Aug.12 03:54 PM a Web browser
Domino Designer -- LotusScript 5.0.13 All Platforms

This is probably completely moot, since R5 is so elderly, but I was looking for it and didn't find it, so I'll post it in case some other poor, upgrade-forsaken developer finds it useful.

I've been looking for a way to manipulate the contents of a Rich Text field (RTF) on an existing (previously saved) document via Lotus Script.

I kept running into the issue where anything done to the RTF in UIDocument or Document would be overwritten by the previously saved contents of the RTF.

Finally I found a way to manage it, it's not brilliant, it's not elegant, in fact it's rather dumb and brutish, but it works, and "works" is a pretty compelling argument.

Basically, you get a handle to the back-end document by way of NotesDatabase.GetDocumentByUNID -- that is you read the UNID from the document you have, and make a clean request directly from the DB for the document by its UNID:

Set Doc = DB.GetDocumentByUNID( NotesUIWorkspace.CurrentDocument.Document.UniversalID )

"Doc" is now a handle straight to the back-end instance of the document you're working from. Make and save changes to the RTF there, and they will become the "previously saved" data which overwrites the contents of the open Doc's RTF when you save it.


  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow