|
|
|
Import of Word documents using a predefined filename or pathname including wildcards produces runtime error
The import of Word documents can be defined in two ways:
Leaving the Filename field in the Integra profile blank. In this case the user is presented with a File-Select dialog at runtime. This option works fine.
The other option is to predefine a filename ( C:\MyDocuments\Word.DOC ) or pathname eventually including wildcards ( C:\MyDocuments\*.DOC ). In all version of Integra up to release 2.2 the use of the Filename field causes a runtime error "This file could not be found...".
The following code placed into Script Callback field of the Integra profile (Advanced tab) is a workaround to this problem. You still have to predefine the filename or pathname in the Filename field of the profile.
Const CB_INITIALISE = 3
Const CB_BFORREADNOTES = 6
Const CB_BFORREADCOM = 7
Const CB_BFORWRITECOM = 1
Const CB_BFORWRITENOTES = 8
Const CB_BFORCOMACTION = 5
Const CB_BFORNOTESACTION = 2
Const CB_TERMINATE = 4
select case stats.cbstatus
case CB_INITIALISE
fnam = Dir$(import.Record.Structure.FileName)
path = ExtractPath(import.Record.Structure.FileName)
Redim Preserve stats.FList(0) As String
stats.FList(0) = ""
i = -1
Do While Not fnam = ""
i = i + 1
Redim Preserve stats.FList(i) As String
stats.FList(i) = path & fnam
fnam = Dir$
Loop
case CB_BFORREADNOTES
case CB_BFORREADCOM
case CB_BFORWRITECOM
case CB_BFORWRITENOTES
case CB_BFORCOMACTION
case CB_BFORNOTESACTION
case CB_TERMINATE
end select |
. |
|
FAQ# 0067
|
|
|
|   | |
| QUICK LINKS | |
| | |
|
| |
|   | |
| | |
|   | |
|   |