Attachment to open in web

Hi,in Clien Application there is a button on click of which as attached file is open on web ,but the same code is not working for web Application to open the Attached file on web.

My part of code is as below →

Dim session As New NotesSession 	

Dim db As NotesDatabase 	

Dim doc As NotesDocument 

Dim view As NotesView 

Dim ritem As Variant 	

Dim Result As Integer

Dim FileName As Variant	



Set db=session.CurrentDatabase

Set view=db.GetView("AspireV2_help")

Set doc=view.GetFirstDocument()

Set ritem = doc.GetFirstItem( "file1" )



If ( ritem.Type = RICHTEXT ) Then

	Forall o In ritem.EmbeddedObjects

If ( o.Type = EMBED_ATTACHMENT ) Then

Call o.ExtractFile( "c:\help.html"		FileName ="C:\Program Files\Internet Explorer\iexplore.exe ""C:\help.html"""

'Msgbox FileName

Result = Shell(FileName, 3)

End If

End Forall

End If

Any help or suggestion will be greatly appreciable.

Regards

Rupesh.

Subject: Attachment to open in web

Not looking at any code details for now, please consider the following. Your LotusScript code runs on the Server. Always. On what machine do you want to launch Internet Explorer? Where will your file be detached?

Anyhow, I wonder what you want to accomplish at all. Maybe you could rather describe your business need, there’s probably a way to fulfill it. Easier.

Subject: To open an attachment on the web…

To open an attachment on the web you need to build a url that will be opened in the browser. The url should be in the format of:

http://www.domain.com/database.nsf/0/[DocUNID]/$File/[AttachmentName]?OpenElement

This will launch the embedded attachment directly from the document it is contained in.