Solved

How to detach attachments in notes?

Posted on 2000-05-11
4
428 Views
Last Modified: 2013-12-18
Hi

How do i detach attachments to a specified directory in notes by selecting the document and clicking a button. And also it should launch the application after detaching???
0
Comment
Question by:fenil
  • 2
4 Comments
 
LVL 5

Expert Comment

by:snocross
ID: 2800819
Are you saying you want to detach it programatically instead of manually specifying the location?  And are you also saying you want to automatically launch the attachment afterwards without having to manually double-click the attachment?
0
 
LVL 5

Accepted Solution

by:
snocross earned 200 total points
ID: 2800848
This script detaches and removes all the file attachments in a document's Body item that are larger than 100,000 bytes. (This size can be adjusted) The first file attachment that's found gets detached to c:\reports\newfile1, the second attachment that's found gets detached to c:\reports\newfile2, and so on.
Dim doc As NotesDocument
Dim rtitem As Variant
Dim fileCount As Integer
Const MAX = 100000
fileCount = 0
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) _
And ( o.FileSize > MAX ) Then
fileCount = fileCount + 1
Call o.ExtractFile _
( "c:\reports\newfile" & Cstr(fileCount) )
Call o.Remove
Call doc.Save( True, True )
End If
End Forall
End If
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2802682
Hi Fenil,

Did you say that you want to detach attachments from a mail or attachments from a "Body" field ?

Jus Curious...

Can you give a bit more explaination on the document that you want to process ?

-Arun


0
 

Author Comment

by:fenil
ID: 2803317
Yeah it worked when i added the handle to the document etc...

Thanks
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now