Getting task description using lotusscript

Hi,

I’m trying to place newly added tasks from within my notes client into outlook.

This is working, but I cannot get access to the description field of the notes task.

I’m using something like this to loop over all the fields:

Set fieldItem = doc.GetFirstItem(“Form”)

itemValue = fieldItem.values(0)

Select Case itemValue

Case “Task”:

Forall item In doc.Items

  itemName = item.Name

  set fieldItem = doc.GetFirstItem(itemName).values(0)

  Forall value In fieldItem.Values

    ' store value

  End Forall

End Forall

End Select

when I come at the “Body” field when going through this loop, I get the errormessage “Type Mismatch”

But what type should I use then ?

I cannot find any reference to the possible fields of the task item

and therefore I don’t know what the type of the Body field is.

Can anyone help me with this please ?

Also, does somebody know where I can find more info about the fields that are returned by the .Values property

for each specific item, such as tasks, appointments, etc. ?

Subject: getting task description using lotusscript

By definition Body is a NotesRichTextItem in this context.

You can test using something like this sample from the Help file:

Dim doc As NotesDocument

Dim rtitem As Variant

Dim plainText As String

Dim fileNum As Integer

'…set value of doc…

Set rtitem = doc.GetFirstItem( “Body” )

If ( rtitem.Type = RICHTEXT ) Then

plainText = rtitem.GetFormattedText( False, 0 )

End If

’ get a file number for the file

fileNum = Freefile

’ open the file for writing

Open “c:\plane.txt” For Output As fileNum

’ write the formatted text to the file

Print #fileNum, plainText

’ close the file

Close #fileNum

Subject: RE: getting task description using lotusscript

Just tried it and it seems to work.Thanx for your help !

BTW, do you know where I can find a table or something with all the possible fields

for tasks, appointments, etc ?

Doesn’t seem to be available in the notes help file