Hai all Experts, Is it Possible that when I will click on a attachment or any hotspot that attachment will save in a specific location.like c:,d:.
If yes then Please guide me.
Pawan
Hai all Experts, Is it Possible that when I will click on a attachment or any hotspot that attachment will save in a specific location.like c:,d:.
If yes then Please guide me.
Pawan
Subject: How To Save a Attachment
Yes!
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim rtitem As Variant
Dim fileCount As Integer
fileCount = 0
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
fileCount = fileCount + 1
Call o.ExtractFile ( "C:\Temp" & Cstr(fileCount) )
End If
End Forall
End If
End Sub
Subject: RE: How To Save a Attachment
Hai Ramin, Thanks a lot for the response. But Ramin I m working in web.
So where i write the code. in the form where the attachment attach.
and How its works in web.
If u have code for web.
So please guide me.
Pawan
Subject: RE: How To Save a Attachment
dear pawan…
I think you can write the code in an agent and call the agent…dont u think it will do…??
kaushik das
(wdc)
Subject: RE: How To Save a Attachment
Hai Kaushik, Thanks for ur Suggestion. I m tring to write the code but its not working.
As well as I using the command like.
@Command( [AttachmentDetachAll] )
Its Working in Notes But Not In web.
Hope u will send some Tips.
Also Send ur Mobile Number
Pawab
Subject: RE: How To Save a Attachment
You can create an action button with the formula @Command([RunToolsMacro];“Your Agent”)and create an agent which one you call in your formula. You’ll need a certification on web which one ask and allows you to write on your localy hard disk.
Regards
Subject: RE: How To Save a Attachment
An @Command will not work in an agent that runs on the server. You will have to use LotusScript for this.