PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Extracts a file attached to an item of the current document in Lotus Notes. This file is automatically copied to the specified location.
Example
// Ouverture de la connexion
IDConnexion is int
IDConnexion = NotesOpenConnection("MotDePasse", "ServeurMars", ...
"C:\Users\Julie\AppData\Local\Lotus\Notes\Data\user.id")
// Spécification de la base Lotus Notes à utiliser
IDBase is int
IDBase = NotesOpenDatabase(IDConnexion, "julie.nsf")
...
// Lecture du premier document
NotesDocumentFirst(IDBase)
...
// Attachement d'un fichier au document en cours
NumFic is int
NumFic = NotesAddAttachment(IDBase, "MonChampLotusNotes", ...
"C:\MesDocuments\MonFichier.TXT")
...
// Extraction de ce fichier
NotesExtractAttachment(IDBase, "MonChampLotusNotes", NumFic, "D:\MesFichiers\FichierA.TXT")
// Open the connection
ConnectionID is int
ConnectionID = NotesOpenConnection("Password", "MarsServer", ...
"C:\Users\Julia\AppData\Local\Lotus\Notes\Data\user.id")
// Specify the Lotus Notes database to use
DatabaseID is int
DatabaseID = NotesOpenDatabase(ConnectionID, "julia.nsf")
...
// Read the first document
NotesDocumentFirst(DatabaseID)
...
// List the files attached to the Lotus Notes item named "MyLotusNotesItem"
FileList is string
FileList = NotesListAttachment(ConnectionID, "MyLotusNotesItem")
...
// For each attached file
AFile is string
i is int = 1
FOR EACH STRING AFile OF FileList SEPARATED BY CR
// Copies the attached file into the project directory
NotesExtractAttachment(DatabaseID, "MyLotusNotesItem", i, fExeDir() + ["\"] + AFile)
i++
END
Syntax
<Result> = NotesExtractAttachment(<Session identifier> , <Lotus Notes item> , <File index> , <Location of copied file>)
<Result>: Boolean
  • True if the file was extracted,
  • False otherwise. If an error occurs, the ErrorOccurred variable is set to True.
    To get the details of the error, use ErrorInfo with the errMessage constant.
<Session identifier>: Integer
Identifier of session to use. This identifier is returned by the EmailStartNotesSession function or the NotesOpenDatabase function.
<Lotus Notes item>: Character string
Name of the "Rich Text" Lotus Notes item to which the file is attached. In most cases, this control corresponds to the "BODY" control.
To find out the name and type of fields in the current Document Notes, use the NotesListItem function.
<File index>: Integer
Subscript of the file to extract. This subscript corresponds to the rank of the file in the list of files for the Lotus Notes item (for example, the subscript of the 3rd attached file will be 3).
Caution: The subscripts of the files are modified when a file is deleted.
<Location of copied file>: Character string
Name and full path of the file to extract.
Remarks
Each item of a Notes document can contain up to 256 attached files.
Component: wd270mess.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment