Hi
I want to re-use the save and file button from the mail file template in a discussion database. I have copied over the action but when I click on the button and select a folder to save to, the document is not moved there, it just saves in the normal view.
Can someone tell me what I am missing?
Thanks in advance.
Subject: Re-using the Save and File option
Hi Murray,
You have missed the code in the library called CoreEmailClasses
I have copied the code that you need and changed it a little bit to fit in your DB.
Try to put this code in the QueryClose event of the form that has the Save and File button and let me know if it works.
Dim Session As New notessession
Dim Document As NotesDocument
Set Document = Source.Document
If Source.Document.hasitem("tmpSendandFileFolder") Then
foldername = Document.Getitemvalue("tmpSendandFileFolder")(0)
If Len(foldername) > 0 Then
If foldername = "($Trash)" Then
' using @Version because it backwards compat to r3
v = Evaluate( |@Version| )
versionNumber = Format(v(0), "Fixed")
If ( versionNumber > 177 ) Then
e = Evaluate("@IsSoftDeleteEnabled")
If e(0) = 1 Then
If Document.isuidocopen Then
noteid = Document.UniversalID
Set Document = session.currentdatabase.getdocumentbyUNID(noteid)
Document.remove( True)
Else
Document.remove(True)
End If
Else
Call Document.Putinfolder(foldername) ' SoftDeletes is not enabled
End If
Else
Call Document.Putinfolder(foldername) ' not running R6 or better client
End If
Else
Call Document.Putinfolder(foldername) ' not Trash Folder
End If
End If
End If
Subject: RE: Re-using the Save and File option
Hi Fadi,
That works perfectly !!
Thanks for that its very much appreciated: )
Cheers.