Solved

Processing an attachment in a mail

Posted on 2002-07-08
18
202 Views
Last Modified: 2013-12-18
Hi,
i need an action button in my Memo form that detaches the attachment in a directory that i choose, then deletes that attachment from the mail and replaces it by it's link to it's new directory.

Is it possible?

Thanks,
Koray.
0
Comment
Question by:koray_uygun
  • 9
  • 7
  • 2
18 Comments
 
LVL 10

Expert Comment

by:zvonko
ID: 7137268
Hello Korey,
it is possible.

But only for 300 points and an A+ :)

Cheers,
zvonko

0
 

Author Comment

by:koray_uygun
ID: 7137381
Waoww! you're expensive man!! Let's do it 200 ;-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7137454
Sorry,

I have no solution :)

(This is funny; let's do it like on a bazaar :)

Relay, the most difficult part is the link to a file on disk. Until now all my ideas where not successful...

And this surely does not depend on points :(

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7137501
OK Korey,

I have found the code on net, but...

You think I am expensive? Let's do this way: you offer 300 points. Then if some buddies provide the solution to the question declared on top here I will add 300 points of mine if the provided solution do this requirements. If after one week no solution is here visible, then I get the points. Is a week to long for you?

0
 

Author Comment

by:koray_uygun
ID: 7137573
Yes, it's a bit too long. I'll give 250 points ok? Can you give me until then at least how to open an explorer window to tell where to detach?

My name is Koray.
0
 

Author Comment

by:koray_uygun
ID: 7137581
Yes, it's a bit too long. I'll give 250 points ok? Can you give me until then at least how to open an explorer window to tell where to detach?

My name is Koray.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7137705
Uhps :)

Of course, this is for free:
Sub Click(Source As Button)
     Dim ws As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Dim session As New NotesSession
     Dim doc As NotesDocument
     Dim object As NotesEmbeddedObject
     Dim FileName As String    
     Set uidoc = ws.CurrentDocument
     Set doc = uidoc.Document
     Forall item In doc.Items
          If (item.Name = "$FILE") Then
               FileName = item.Values(0)
               Print "File: " & FileName
               Set object = doc.GetAttachment(FileName)
               Call object.ExtractFile("C:\tmp\" & FileName)
               Call object.Remove()
          End If
     End Forall
     Call doc.Save(True, False)
End Sub

Do not be confused by attachment icon. The icon is NOT removed; only the attachment behind the icon.

Good luck, Koray :)


0
 

Author Comment

by:koray_uygun
ID: 7137713
I know how to detach a file but what i need to know is  how to open en explorer window to tell notes where to detach it.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7137727
Sorry,

this is the correct one:
Sub Click(Source As Button)
     Dim ws As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Dim session As New NotesSession
     Dim doc As NotesDocument
     Dim object As NotesEmbeddedObject
     Dim FileName As String    
     Dim dirpath As Variant
     Set uidoc = ws.CurrentDocument
     Set doc = uidoc.Document
     Forall item In doc.Items
          If (item.Name = "$FILE") Then
               FileName = item.Values(0)
               Print "File: " & FileName
               Set object = doc.GetAttachment(FileName)
               dirpath = ws.OpenFileDialog(False, FileName, "", "c:\temp", FileName)
               Call object.ExtractFile(dirpath(0))
               Call object.Remove()
          End If
     End Forall
     Call doc.Save(True, False)
End Sub

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:zvonko
ID: 7137734
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7138462
Beggar !

LOL....
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7138485
I wondered where your comment is :)

Have you seen? I passed the 100K line! (with grand total only :)

0
 

Author Comment

by:koray_uygun
ID: 7140080
Hi, Zvonko, i went to the link but understand nothing about it, which language is it? Lotus Script??
0
 

Author Comment

by:koray_uygun
ID: 7140084
I just need a pop up window in what i can choose where to detach the attachment.
0
 
LVL 10

Accepted Solution

by:
zvonko earned 250 total points
ID: 7140247
This is the line for the popup:
dirpath = ws.OpenFileDialog(False, FileName, "", "c:\temp", FileName)

And the language on those page was indeed LotusScript.
Now you know why I ask for 300 points :)

Arun would ask for 500! (hi Bro :)

0
 

Author Comment

by:koray_uygun
ID: 7140747
250 points was a little bit expensive for :

dirpath = ws.OpenFileDialog(False, FileName, "", "c:\temp", FileName)

But i hope you'll tell me if you can find a solution to create a link to the file.

Koray.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7140856
Cheater...Beggar....I tell you something Zvo !  I will be the first one to get to 100k

:-)
Arun.

Hi Bro !  :-) Good going huh ?
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7140911
Cheerio! I am already behind the 100000 line :) I got yesterday two biggies with 500 points each, but in JavaScript topic are.

Koray, of course you will get the resolution here when I resolve it for myself. Until now this LotusScript code from the linked page is producing only garbage. Main idea behind the code is to use Win32 send key functions to manipulate the Notes client menu dialog.

So long,
zvonko

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus Notes 6.5.5 6 208
Domino Application - View Refresh on Subform 15 95
Lotus notes view not working using Trim 14 209
Domino Server 11 65
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…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

17 Experts available now in Live!

Get 1:1 Help Now