Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP outlook 2010 automation
Message
From
14/08/2014 03:19:06
 
 
To
14/08/2014 03:07:06
Safwan Kaskas
Lebanese Islamic Bank
Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01605430
Message ID:
01605634
Views:
66
Unfortunately I am not able to debug the code for you since I'm tied up in another project. My bet advise is to step through the code, and check that all the variables hold correct values.

Note that your code is much easier to read, if you put < pre > before your code, and < /pre > after. Remove the spaces which I had to add in order to show the otherwise hidden html tags.

>here goes,
>the error is at oitem.send
>
>*** ========================== ***
>*** PROCEDURE SendMail ***
>*** ========================== ***
>*** send auto mail
>PROCEDURE SendMail
>PARAMETERS tcTo,tcSubject,tcBody,tcAttach
> o=createobject("Outlook.Application.14")
> 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform