Examples: ExtractFile method in Nomad for web browsers

This script detaches the file attachment from the current document for further lotusscript operations.

Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim att As NotesEmbeddedObject
Dim session As New NotesSession
Dim prefix As String
Dim attName As String
Dim destFile As String

If session.Platform = “WebBrowser” Then
	prefix = “vfs:/tmp/”
Else
	Prefix = “C:\temp\”
End If

Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
ForAll item in doc.Items
	If item.type = ATTACHMENT Then
		attName = item.values(0)
		Set att = doc.getAttachment(attName$)
		destFile$ = prefix & attName$
		att.extractFile(destFile)
		‘. . . Do any script operations on the local file
	End if
End ForAll