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