Hello,
Have somebody know : How to Open Attachment on NotesUIForm in LotusScript ??
Thanks in advance.
Hello,
Have somebody know : How to Open Attachment on NotesUIForm in LotusScript ??
Thanks in advance.
Subject: How to Open Attachment on NotesUIForm in LotusScript
You will need to extract the attachment to local harddisk, then issue shellexecute to open it.
=======================================
Private Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim rtitem As Variant
Set db = New NotesDatabase( “SanFrancisco”, “hill.nsf” )
Set view = db.GetView( “All documents” )
Set doc = view.GetLastDocument
Set rtitem = doc.GetFirstItem( “Body” )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
o.ExtractFile("c:\temp\"+o.Name)
shellexecute ("c:\temp\"+o.Name)
Call ShellExecute(0&, NULL, "c:\temp\"+o.Name, NULL, "c:\temp", 0)
End Forall
End If
Subject: RE: How to Open Attachment on NotesUIForm in LotusScript
Thanks a lot…!!That’s really helpful for me.