Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP outlook 2010 automation
Versions des environnements
Network:
Windows 2008 Server
Hi All,
We have recently updated our office 2003 to office 2010, sending mail automation is now crashing specifically on this line of code:
o=createobject("outlook.application")
the complete procedure I use is found below.
kindly advise
regards
*** ========================== ***
*** PROCEDURE SendMail ***
*** ========================== ***
*** send auto mail
PROCEDURE SendMail
PARAMETERS tcTo,tcSubject,tcBody,tcAttach
o=createobject("outlook.application")
oitem=o.createitem(0)
oitem.subject=tcSubject
oitem.to=tcTo
oitem.body=tcBody
IF attachfound
IF !EMPTY(tcattach)
= ALINES(arattachments,tcattach,",")
FOR k=1 TO ALEN(arattachments,1)
tcattach="'"+arattachments(k)+"'"
oitem.Attachments.Add(&tcattach)
ENDFOR
ENDIF
ELSE
IF !FILE(&tcAttach)
MESSAGEBOX('Attachment File Not Found.',0+16,'Processing')
DO logprog WITH PROGRAM(),'Attachment File Not Found. Send Mail Aborted.','I'
RETURN
ENDIF
oitem.Attachments.Add(&tcattach)
ENDIF
** to send it
oitem.send
DO logprog WITH PROGRAM(),'Mail Sent Successfully To Recepients.','I'
** to clear up
o=.null.
RETURN
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