Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Mapimail.vcx
Message
De
14/03/2001 22:07:10
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00477327
Message ID:
00485158
Vues:
29
Hi Nigel,

Sorry if I disturb, but I tried Mapiclass with win2k, win98 and win95.
No matter what I do, GetAttachmentCount allways returns 0
even if there's only one message with an attached file.
Is there a workaround to this ?
Is there a problem using MapiClass with non english version of Windows ?
Any Ideia ?

TIA
Peter


Im sendig again my test code:

SET CLASSLIB TO mapimail ADDITIVE
enviado_por = "Alexandre Martins Dantas" && send by
data_ini = {^2001/01/01} && start Date
data_fim = DATE() && end Date
loMail = CREATEOBJECT("cusMAPI") && Load class for e-mail
lnMail = loMail.ReadMail("","",.F.,enviado_por,"",data_ini, data_fim,.T.)
IF lnMail > 0 && If exist e-mail send by this person
nMensagem = loMail.GetFirstMessage() && get the first message from this person
SET STEP ON && problem starts next line because allways it returns 0 from GETATTACHMENTCOUNT
nArqAtachado = loMail.GetAttachmentCount(nMensagem) && verify if a file is attached ( how many )
IF nArqAtachado <> 0 && If exist a file attached
FOR N = 1 TO nArqAtachado && get the file
z = loMail.GetAttachmentFile(N)
IF UPPER(JUSTEXT(z)) = "XLS" && If the attached file is an excel file
COPY FILE z TO C:\_teste_vfp\e_mail\acoes.XLS && copy file to dir.
*=copy_to_dbf("acoes.xls") && copy information to Table and delete xls file
ENDIF
ENDFOR
lnMailx = lnMail + 1
DO WHILE lnMailx <= lnMail
= loMail.GetNextMessage()
nArqAtachado = loMail.GetAttachmentCount(nMensagem) && verify in an file is attached ( verifica se existe arquivo anexado( quantos ))
IF nArqAtachado <> 0
FOR N = 1 TO nArqAtachado && get the file
z = loMail.GetAttachmentFile(N)
IF UPPER(JUSTEXT(z)) = "XLS"
COPY FILE z TO C:\_teste_vfp\e_mail\acoes.XLS && copy file to dir.
*=copy_to_dbf("acoes.xls") && copy information to Table and delete xls file
ENDIF
ENDFOR
ENDIF
lnMailx = lnMailx + 1
ENDDO
ENDIF
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform