Could you please tell me how i make the value of doc.internet address = first name . last name@domain in the following script
Many many thanks
Sub Initialize
Dim s As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim maildom As String
maildom = "@acme.com"
Set s = New NotesSession
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
For x = 1 To dc.Count
Set doc = dc.GetNthDocument(x)
fname = doc.firstname
lname = doc.lastname
doc.internetaddress = fname.lname"maildom"
Call doc.Save (True,False)
Next
End Sub
Subject: Setting a field from multiple items
fname & “.” & lname & maildom
Collin
Subject: RE: Setting a field from multiple items
i c.
But i now get Type mismatch??
Sub Initialize
Dim s As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim maildom As String
maildom = "@acme.com"
Set s = New NotesSession
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
For x = 1 To dc.Count
Set doc = dc.GetNthDocument(x)
doc.internetaddress = doc.firstname & “.” & doc.lastname & maildom
Call doc.Save (True,False)
Next
End Sub
Subject: RE: Setting a field from multiple items
doc.internetaddress = doc.firstname(0) & “.” & doc.lastname(0) & maildom
Subject: RE: Setting a field from multiple items
Thanks very much Colin.
Could you please tell me why the first name and last name are arrays?
Sorry, as you have probably guessed I’ve not much idea in the dev world -YET
Subject: RE: Setting a field from multiple items
Notes document fields are potentially multi-valued, even if they aren’t for most actual fields, so in that particular shorthand notation they’re treated as arrays.
Subject: RE: Setting a field from multiple items
Great. Thanks all for the help