Counter doesn't work (Lotus script)
Posted on 2005-05-10
Some days ago I've already asked this question and gave the points because I thought it would work but I was wrong. Could you have a look at the below issue again?
The Lotus script is working but it can see only one (the first) name in the Field.
There is a field (artname) that contains 6 names.
All 6 users should be allowed to edit the document but despite the cycle only the first name has access to the document.
Can you tell me what's wrong with it?
Here is the script:
If doc.Status(0) = 3 Then
user = session.UserName
Dim counter As Integer
Dim beuser As Integer
beuser = 0
For counter=0 To Ubound(doc.artname)-1
Set nam = session.CreateName( doc.artname(counter) )
usercn = nam.Canonical
If user = usercn Then
beuser = 1
If beuser = 1 Then
Continue = True
Messagebox "Sorry, but you haven't enough right to edit this document.", 64, "Warning!"
Continue = False