Dim ses As New NotesSession
Dim ws As New NotesUIWorkspace
Set db = ses.CurrentDatabase
Set uidoc = ws.CurrentDocument
Call uidoc.Save
Set doc = uidoc.Document
Set rtitem = doc.GetFirstItem("Body")
If rtitem.Type = RICHTEXT Then
FileName = "c:\\temp\\junk.txt"
Set object = rtitem.Embedobject(EMBED_ATTACHMENT, "", FileName)
End If
doc.SaveOptions = "0"
Call uidoc.Close
Call ws.EditDocument(False, doc)
End Sub
I’m assuming you’re in edit mode for this to work. If you have an editable field “SaveOptions” I’d remove it. Also, if the document already has a “SaveOptions” field remove it.
I can e-mail you my test db if you can’t get it working.
Raymond, thanks for the help. I created a blank form with only the button and the Body field and it worked fine.
I am trying to do this within the memo form, using the standard r6 template. So there must be something else that is causing the Save dialog to come up.