Lotus Script help

I found this scirpt to forward mail to one of my users PDA I modified it to not allow for attachements to get forwarded. It works real well with one small issue: It marks the forwarded mail as read in the clients mail file. I just want the mail to forward without marking the mail as read. Could someone please read this over and let me know if you see why it isn’t working… I added this piece of code to the original to try and accomplish my task but it isn’t working : newmail.MarkUnread

Thanks

Sub Initialize

On Error Resume Next

Dim session As New notessession

Dim maildb As notesdatabase

Set maildb = session.currentdatabase

Dim inbox As notesview

Set inbox = maildb.getview(“($Inbox)”)'get inbox

Call inbox.refresh 'refresh inbox to get newly arrived mails after this new mail

Dim newmail As notesdocument

Set newmail = inbox.getlastdocument’ get the last document

Dim flag As Integer

flag = 0

For i = 1 To 5 ’ check last five documents

If Not(newmail Is Nothing) Then

If newmail.myfwd(0) = “” Then ’ if it has not been forwarded

Set doc = New notesdocument(maildb)

doc.form = “Memo”

doc.SendTo = “mail@mail.ca” 'this should be changed to your e-mail

doc.Subject = "From : " & Left _

(newmail.from(0),12) & “Sub:” & _

newmail.Subject(0)& “”

'Forall item In newmail.Items 'check for attachments, if there - copy to new mail

'If (item.name = “$FILE”) Then

'Dim ritem As NotesRichTextItem

'Set ritem = New NotesRichTextItem _

'(doc, “Body”)

'Dim rtext As String

'Dim oritem As NotesRichTextItem

'Set oritem = newmail.GetFirstItem(“body”)

'Call ritem.AppendRTItem( oritem )

'rtext = oritem.getformattedText(False, 0)

'Call ritem.AppendText( rtext )

'flag = 1

'End If

If flag <> 1 Then

doc.body = newmail.body 'if no attachment then just copy the text

flag = 0

End If

'End Forall

Call doc.send(False)'forward/send the mail

newmail.myfwd = “yes” 'flag the forwarded mail

newmail.MarkUnread

Call newmail.save(False,False,False) ’ save after flag

End If

End If

Set newmail = inbox.getprevdocument(newmail)

Next

End Sub

Subject: Lotus Script help

I don’t believe that you can mark a document as unread in lotusscript although according to this it will be a new feature in release 8.

http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/NewDomino8Objects

You may be able to do this using the C++ API so you could try searching the forum or google to see if someone has written some code that you could use.