Solved

How to detach attachments in notes?

Posted on 2000-05-11
4
431 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Querying received e-mails from an agent 7 205
Lotus Notes 8.5 1 149
CopyAllItems causing problem with permissions 3 93
SQL Server linked server to Lotus notes 3 482
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

822 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