Document Save issue

I’m trying to save a series of documents created via the CreateDocument method of the NotesDatabase object, but never see them in my database once the code executes. Here’s the abridged code:

Set objNotesDocument = objNotesDB.CreateDocument

                        objNotesDocument.AppendItemValue "Author", "Information Systems"

                        objNotesDocument.AppendItemValue "Contract_Code", strContractCode

                        objNotesDocument.AppendItemValue "Contract_Company_Code", strCompanyCode

                        objNotesDocument.AppendItemValue "Contract_Year", strYear

/* the following appends an Adobe PDF file attachment */

Set objNotesRTItem = objNotesDocument.CreateRichTextItem(objPDF_File.Name)

Set objNotesEmbeddedObject = objNotesRTItem.EmbedObject(EMBED_ATTACHMENT, “”, objPDF_File)

If objNotesDocument.Save(True, False) Then

/* woohoo */

Else

/* #%@! */

End If

The Save method on the document object returns True, but when the process ends, the documents aren’t in the database! What am I doing wrong?

TIA

Markb

Subject: Document Save issue

Oh, they’re probably in the database, but you have never set the “Form” item of the document, so it’s unlikely that it will turn up in anything but an “all documents” view (Selection formula is SELECT @All).

Subject: RE: Document Save issue

Thanks, Stan, for your very quick response. That was indeed the problem.