I have the following method defined within a class that will attach files to an email object. The method recieves as a parameter either a path or a path and a filename. If it is the path only, I use ADIR() to create an array of the files in said path and cycle through the array attaching all files in that subdirectory. Here is where my question comes in. When the method is called again with a second directory to attach, the varible temp (array that is defined within the ADIR() is not found. I attempted to DIMENSION my temp array before the ADIR() but that leaves me in the same situation. Working on the first call but the second, I have an array filled with logical false like the ADIR() was never executed. When stepping through the line is executed, but the array is not filled with info. Any suggestions are MORE THAN WELCOME. Thank you in advance...
Mike
LPARAMETER pcFile
IF right( pcfile, 1 ) = '\'
ADIR( latemp , pcfile + '*.*' )
lntotfilestoattach = ALEN( latemp, 1 )
counter = 1
for i = 1 to lntotfilestoattach
lcfilename = latemp[counter,1]
lcattachfile = pcfile + lcfilename
oAttachment = ;
this.oOutlookEmailMessage.attachments.add(lcattachfile)
counter = counter + 1
loop
endfor
else
IF FILE(pcFile)
oAttachment = ;
this.oOutlookEmailMessage.attachments.add(pcfile)
ELSE
MESSAGEBOX("File: " + pcfile + "not found")
EndIf
ENDIF
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement