doc.fieldname problem

hello experts,
I've a litttle question
I'm writing a lotusscript code, but I've a little problem
Here's an example
' this is oke
fieldname = doc.month(0) 'example may
'here goes it wrongs
doc.fieldname = .................

if I write doc.fieldname he's looking in the document to a field called fieldname, but he need to look to a field doc.may because fieldname has the value may
How can I do that ?
doc. + fieldname doesn't work
Who is Participating?
zvonkoConnect With a Mentor Commented:
Try this:
Dim doc As NotesDocument
Dim item As NotesItem
Dim fieldname as String
fieldname = doc.month(0)
Set item = doc.ReplaceItemValue(fieldname, "...")


This doc.Fieldname = Value works something like this....

if there is a fieldname already in the document then it replaces the value, if there is no field in the document then it creates a new field and puts your value in it.

Hope it helps!
magnexAuthor Commented:
Thanks for the quick answer
Thanks for the points Magnex :-)

to Arun: Bro, check my view SELECT formula...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.