Close and exit without saving the document

Hi All, Below is my sample VB program that calling Notes OLE COM+. In this VB program, I need to display the some data in the DialogBox. And in this DialogBox, if the user click Ok, then the data will store into Document, otherwise the Document should’n save and close without prompt the user to save.

==================

Dim ws As Object

Dim uidoc As Object

Dim doc As Object

Dim rc As Integer

Set ws = CreateObject(“Notes.NotesUIWorkspace”)

Set uidoc = ws.COMPOSEDOCUMENT(“tghtdi02/tmb/my”, “focv2\problem.nsf”, “VBNewDoc”)

Set doc = uidoc.Document

doc.field1 = field1.Text

doc.field2 = field2.Text

rc = ws.DIALOGBOX(“DB”, True, True, False, False, False, False, “Title”, doc) 'example of calling dialogbox form

If rc <> 1 Then

uidoc.FieldClear (doc.field1)

uidoc.FieldClear (doc.field2)

uidoc.Close

Else

uidoc.Save

End If

====================================

However, the Document that opened always prompt the user to save.

So, how do I stop this problem.

Thanks

Subject: Close and exit without saving the document

Try creating a field called SaveOptions on your document and setting its value to 0.

For further information, look up SaveOptions in the Domino Designer help.

Stephen Lister

Subject: set it to “0” (string 0), not to 0 (number)

Subject: RE: set it to “0” (string 0), not to 0 (number)

Good catch - my bad :frowning:

Stephen Lister