| Back | Main view | Parent doc

How to select file name and RichText field for scanned images while using "Attach To Notes" option?

There is IMiSMultiLang Script Library in every database where you enabled IMiS. Just open this Script library and you will find two functions:

IMiSScanFieldName
can be used for selecting RichText field so just alter the code in it and as result RT field name has to be returned. If RT field is not found on form, than scanned image will be attached at the bottom of the document. Doc object is retrieved automaticlly from hidden code.

IMiSScanFileName
can be used for selecting file name of scanned attachment. Result has to be string, which represents file name without file extension, because file extension is added automaticlly based on IMiS/Scan preferences (TIF or PDF). Doc object is retrieved automaticlly from hidden code.

The main idea is to customize file name and Rich Text field location of attachment based on some values in current Notes document.

So lets see simple examples:

1. This example customizes attachment file name if current document Form is 'Invoice'. Otherwise it leaves default file name.

Function IMiSScanFileName(doc As NotesDocument) As String End Function

2. This example customizes Rich text field name if current document Form is "Invoice". Otherwise attachment is placed at the end of the document.

Function IMiSScanFieldName(doc As NotesDocument) As String End Function

WARNING: Error #14 (Write error) may occur when IMiSScanFileName function is custom designed in a way to create target file name from the contents (of the field) in a target (Notes) document where some illegal characters are used (like "/" and similar). If that's the case, you have to remove any illegal characters from object file name.

| Back | Main view | Parent doc