Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
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 6 and 7 Forum

Notes/Domino 6 and 7 Forum



PreviousPrevious NextNext

Andre Milani 3.Jan.07 06:51 AM a Web browser
Domino Designer 6.0.2 All Platforms

Hi everybody,

I'm having problems to replace a substring inside a rich text field called BODY. This works normally. The problem appears when my field BODY exists several times in a DOC.

I don't know if I could explain, so in another words, my document properties (at Notes Client) shows me that the document has more than one field called BODY (probably because the field is too large, that the Notes broke the information in two or more pieces, using the same field name).

I'm trying to access the second piece of information, but I'm not having success. Normally, after I run my code, the document ALWAYS lose the extras-fields of BODY. The document stays with only ONE field (losing all the rest of information).

Anyone know how can I replace a substring inside multi-field (the same field broken in many pieces)?

Thanks a lot!

My code is:
Sub Initialize
On Error Goto ErrorHandler

Dim ss As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim buffer As String
Dim array As Variant
Dim i As Integer
Dim y As Integer

Set db = ss.CurrentDatabase
Set view = db.GetView("vdoc")
Set doc = view.GetFirstDocument
i = 0

While Not doc Is Nothing
If doc.HasItem("Body") Then

buffer = ""
array = doc.GetItemValue("Body")
y = 0
Forall x In array
buffer = DSStringReplaceSubstring(Cstr(x), "filesdc01", "qualitaalias")
array(y) = buffer
y = y + 1
End Forall

Call doc.ReplaceItemValue("Body", array)
Call doc.Save(True, False)
End If

i = i + 1
Print "Checked: " & Cstr(i)
Set doc = view.GetNextDocument(doc)

Exit Sub

Msgbox "Error: " & Err() & ": " & Error() & " na linha " & Erl()

End Sub

Problems to replace string in a mul... (Andre Milani 3.Jan.07)
. . RE: Problems to replace string in a... (Brandt S Fundak... 3.Jan.07)
. . . . Multiple Rich Text Items (devin olson 3.Jan.07)
. . . . . . RE: Multiple Rich Text Items (Brandt S Fundak... 3.Jan.07)
. . . . . . . . RE: Multiple Rich Text Items (devin olson 4.Jan.07)
. . RE: Problems to replace string in a... (devin olson 3.Jan.07)
. . RE: Problems to replace string in a... (Matthias Brockh... 2.Jul.07)

  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
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
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

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite