LotusScript NewNotes Doc appears in Drafts

Hi all,

I have created a new document in another database. Then moved the document to the ($Alarms) view. But although I have set a PostedDate field, the Drafts view still shows the document !!

Please help.

Call item.CopyItemToDocument(doc2, “$AlarmOffset”)

	Set item = doc.GetFirstItem("CalendarDateTime")

	Call item.CopyItemToDocument(doc2, "CalendarDateTime")

	Set item = doc.GetFirstItem("Subject")

	Call item.CopyItemToDocument(doc2, "Subject")

	Set item = New NotesItem(doc2, "PostedDate", Date$)

'Save and move mini-doc to folder

	Call doc2.PutInFolder ("($Alarms)")

	Call doc2.Save(True , False , True)

	

End Forall

'Close original document

Call uidoc.Close

End Sub

Subject: LotusScript NewNotes Doc appears in Drafts

Looks like you are getting doc as document from uidoc and not destroying it.

try adding doc.remove(true)

HTH

Keshava

Subject: LotusScript NewNotes Doc appears in Drafts - Fixed

Hi Keshava,

Only doc2 was saved in the new database.

I have managed to fix it by Copying the ‘CalendarDateTime’ field to both its own field & the ‘PostedDate’ field.

I think this just ensures that the field is created with the correct Date/Time format etc. as before the time was 00:00

Cheers for your help over the past week