Previous Topic

Next Topic

Book Contents

Book Index

AttachImage

Description:

AttachImage may process the image just like ImportImage or ImportImageAsResource, but it will only attach the image to the specified rich text field.

Declaration:

Declare Function AttachImage Lib "VCII2LN.DLL" (_
Byval pstrNotesServer As String, _
Byval pstrNotesDatabase As String, _
Byval pstrNotesUNID As String, _
Byval pstrNotesField As String, _
Byval pstrFilename As String, _
Byval pstrImportOptions As String) As Long

Parameters:

Param

Description

pstrNotesServer

The Domino server or blank ("") if local.

The output from the NotesDatabase property Server works fine, such as:

db.Server

pstrNotesDatabase

The filename of the database containg the document. Either the relative filename (such as mail\tester.nsf) or the extact filename (such as c:\program files\lotus\notes\
data\mail\tester.nsf) may be used.

The output from the NotesDatabase property FilePath works fine, such as:

db.FilePath

pstrNotesUNID

The Document Unique ID of the document to work on. Note that this should be the textual string of the UNID.

Note that you can use the NotesDocument's property UniversalID, such as:

doc.UniversalID

pstrNotesField

The field name of the rich text field to attach the image to.

pstrFilename

The full filename of the image to attach.

Starting from version 1.4 of II2LN you can also specify any http:// or file:// URL in this parameter

pstrImportOptions

Optional import options to control how the image is processed before it's imported.

Returns:

Same return codes as ImportImage.


Usage:

lRc = AttachImage(db.Server,_
db.FilePath,_
strUNID, _
"Image",_
strFilename,_
strImportOptions)

The call above will attach the file specified in strFilename to the rich text field Image in the document with the UNID stored in strUNID. Before the image is attached, it is processed as specified in the import options in strImportOptions.

Introduced in version:

1.0.0.0

See Also

Functions

Identification functions

ImportImage

ImportImageAsResource

ProcessImage

GetImageDimension

GetImageFromClipboard

GetTIFFFrameCount

GuessImageFormat

GuessImageFormatStrict