Call doc.PutInFolder

I’m currently trying to modify some code that we are using for our end users to forward the SMTP headers for Spam reporting. Currently, the code is using a line that states:Call doc.PutInFolder( “($JunkMail)” )

Call doc.RemoveFromFolder( “($Inbox)” )

That works great, however, I would like the code to instead of putting the email into the $JunkMail folder, to put it in $Trash. When I replace $JunkMail with $Trash, it removes the message from the view and places it in limbo. If I use Domino Designer to look at my $Trash, I see the messages there, but if I look through the client I cannot see it or remove it. The docs do show up in All Documents, and I can delete them there, but I would like to have them show up in the regular Trash view. Any suggestions?

Subject: Call doc.PutInFolder

Andy,

Instead of RemovefromFolder, just do doc.Remove. According to the Notes Designer Help:

This method does a soft deletion if “Allow soft deletions” is enabled. See RemovePermanently to do a hard deletion.

Realize, however, that PutinFolder does not make a copy of the document but instead references the same doc in a folder. Even if you got it to goo into trash when you used the RemovefromFolder method, it would delete the document eventually, and kill the one in the folder and the trash (because they are the same document.)

hth.

brandt

Subject: RE: Call doc.PutInFolder

Thanks for the response!I tried that code, but I am getting the “Function requires a valid ADT argument.” when it runs. Any suggestions?

Subject: RE: Call doc.PutInFolder

Andy,

Do you have UI references in your code? You usually don’t see that error unless you have a UI reference of a document you are attempting to delete…

Brandt