Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Notes Script

Status
Not open for further replies.

Cobby1812

IS-IT--Management
Jun 22, 2006
58
GB
Hi there,
New to all this so please bear with me.

We have a form in a Lotus Database, in this form we are getting the value <capip>, now this value looks like 5613.24758 etc. However in the form we want it to come out as 5613.24. Code below. Anyone help......

Sub ReplaceCapIP
Dim WordSelection As Variant
Dim StringFound As Integer
StringFound = True
While StringFound = True
Set WordSelection = WordDoc.Range(0,0)
With WordSelection.Find
.Text = "<capip>"
.Replacement.Text = doc.OL_prop_capip(0)
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
If .Found Then
With WordSelection.Font
.Bold = False
.Size = 11
End With
WordSelection.Text = doc.OL_prop_capip(0)
Else
StringFound = False
End If

End With
Wend


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top