Modify person doc in the adress book using forall

I try to modify one line of the fullname field in the address book if one condition is true. When i run this code, the print statement print the name but the document is not modified. Is it something special with the fullname field?

While Not(doc Is Nothing)

	Forall nom In doc.FullName

		If (xxxxxxxxxxxxx)

			Print nom

			nom= "test/org"

		End If

	End Forall



	Call doc.Save(True,False)

	

	Set doc = view.GetNextDocument(doc)

Wend

Subject: Modify person doc in the adress book using forall

a for all statement only produces a static representation of each entry in your array.

try this instead of using forall

myarray = doc.Fullname

for a = 0 to ubound(myarray)

if myarray(a) = “blah” then myarray(a) = “hi”

next

doc.Fullname = myarray

Subject: RE: Modify person doc in the adress book using forall

Thank you very much!

Subject: Modify person doc in the adress book using forall

The fullname field usually has more than one entry. You have to pick the fullname(0) or Fullname(1) etc…