What causes the "Do you want to save dialog box"?

Everytime I run a mail send script it saves but then it ask if I want to save the document?  Is there a way not to do the second save?
JaziarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

madheeswarCommented:
u should be doing
call curdoc.close(true,true)

U can place the code here
JaziarAuthor Commented:
Sub Click(Source As Button)
      Dim ws As New NotesUIWorkspace
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim uiDoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim mDoc As NotesDocument
      Dim rtitem As NotesRichTextItem
      Set uiDoc = ws.CurrentDocument
      Call uiDoc.Save
      Set doc = uiDoc.Document
      Set db = session.CurrentDatabase
      Set mDoc = New NotesDocument(db)
      If doc.NagMail(0) = "Yes" Then
            Set item = Doc.ReplaceItemValue("NagList", Doc.SendTo)
      End If
      If doc.ViewBy(0) = "Viewing Restricted (To: Recipients Only)" Then
            Set item= Doc.ReplaceItemValue("DocReaders", Doc.SendTo)
            Set Pitem=Doc.ReplaceItemValue("Private", "Private")    
            Call item.AppendToTextList(session.UserName)
      End If
      
      doc.CreateFlag = No    
     'Set db = session.CurrentDatabase
     'Set mDoc = New NotesDocument(db)
      
      Call doc.CopyAllItems(mDoc)    
      
      If doc.ViewBy(0) = "No Restrictions (All)" Then
            Set item = mDoc.GetFirstItem("DocReaders")
            Call item.AppendToTextList(mDoc.SendTo)
            Call item.AppendToTextList(session.UserName)
      End If
     'mDoc.Form = doc.Subject
      mDoc.Subject = doc.Subject    
      mDoc.Form = "Memo"
      mDoc.SourceDocument = doc.UniversalID
      mDoc.SenderList = session.CommonUserName    
      mDoc.RemoveItem("$FILE")      
      Set rtitem = New NotesRichTextItem(mDoc, "Body" )
      Call rtitem.AppendText( doc.tmpFrom(0) & " has requested your attention.")
      Call rtitem.AddNewLine(1)    
      Call rtitem.AppendText( "Please Click the link below to view the action item.")
      Call rtitem.AddNewLine(2)          
      Call rtitem.AppendDocLink(doc, "PS&SD Dev. Budget Database Link" )    
      Call mDoc.Send(True)
      Call uiDoc.Close(True)
End Sub
madheeswarCommented:
Do u have SaveOptions field?
if so, let it be doc.SaveOptions='1"
then close the document.

and also, after saving the Uidoc, u are adding some values. and after that, u r not saving.
so, use like this;
Call mDoc.Send(True)
 Call uiDoc.Save or try with call doc.save(true,true)
     Call uiDoc.Close(True)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JaziarAuthor Commented:
I have no SaveOptions field

I will try the bottom
JaziarAuthor Commented:
That worked thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.