About detach attachments

If in my inbox, i have 300 emails which are never opened.  Each of the email has 1 or more attachments on it.  How can i using a very quick method to detach them all at once.  If the proposed solution is using script or application, please give it to me.  Thanks.
HenryChangAsked:
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.

ArunkumarCommented:
Hi HenryChang ,

Try the following.
create an action button in the folder ($Inbox). Paste the code in the button and now,  you can select the documents
on which the code should run. This will detach the files of the selected docs.

Good Luck !

-Arun

PS : Find "F:\AAA\" and replace it with the folder you want to detach the files.
The detached files will have FileName+(randomnumber).extension to avoid overwriting.

For more details link to:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=lotusnotes&qid=10235817 

====================================
     Dim ss As New notessession
     Dim db As notesdatabase
     Dim view As notesview        
     Dim rndno As Double
       
     Dim doc As NotesDocument
     Dim rtitem As NotesRichTextItem
     Dim dc as notesdocumentcollection

       
     Set db = ss.currentdatabase
     Set view = db.getview("($Inbox)")
       
     Set dc = db.Unprocesseddocuments

     Set doc = dc.getfirstdocument
       
     Do While Not doc Is Nothing
           
          If doc.HasEmbedded Then
                 
               Forall m In doc.Items                
                     
                    If m.Type = RICHTEXT Then
                           
                         FieldName = m.Name
                           
                         Set rtitem = doc.GetFirstItem( FieldName )
                           
                         ' Check wether the rtitem has embedded objects                          
                         If Isarray (rtitem.EmbeddedObjects) Then
                               
                              Forall obj In rtitem.EmbeddedObjects
                                     
                                   If ( obj.Type = EMBED_ATTACHMENT ) Then
                                         
                                        Randomize
                                        rndno = Int ( Rnd() * 10000 )                                                                                  
                                        tt = Instr(1, obj.source , "." )
                                         
                                        If tt <> 0 Then
                                               
                                             filename1 = Left(obj.source , tt - 1)
                                             filenameextn = Right(obj.source, Len(Cstr(obj.source)) - tt )                                              
                                             Call obj.ExtractFile( "F:\AAA\" & filename1 & "(" & rndno &")" & "." & filenameextn )
                                               
                                        Else
                                               
                                             filename1 = obj.source                                              
                                             Call obj.ExtractFile( "F:\AAA\" & obj.source & "(" & rndno &")")
                                               
                                        End If
                                         
                                   End If
                                     
                              End Forall
                               
                         End If      
                           
                           
                    End If                      
                     
               End Forall
                 
          End If
           
          Set doc = dc.getnextdocument(doc)            
           
     Loop
====================================
0

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
HenryChangAuthor Commented:
Thanks for your answer.  But how can i create the button.  I have no any experience in Lotus Notes and also of application.  Please teach me.  Thanks
0
HenryChangAuthor Commented:
How can i place create a button in the Inbox, please tell me.
0
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.