cheka este codigo extraido del libro automatizacion de Outlook con VFP
#DEFINE olMailItem 0
oMailItem = oOutlook.CreateItem( olMailItem )
Table 3 lists key properties of MailItem.
This code creates a simple message to one person:
#DEFINE CR CHR(13)
#DEFINE olMailItem 0
#DEFINE CR CHR(13)
#DEFINE olCC 2
oOutlook = CreateObject("Outlook.Application")
oMailItem = oOutlook.CreateItem( olMailItem )
WITH oMailItem
.Subject = "Send ideas now!"
.Body = "If you have any ideas on how to proceed with " + CR + ;
"this project, please send them to the whole group now. "
* Add recipients
WITH .Recipients
.Add("
[email protected]")
* Copy the boss
oRecip = .Add("
[email protected]")
oRecip.Type = olCC
* Get Outlook to add all the e-mail addresses
lResolved = .ResolveAll()
ENDWITH
* Save and send
.Save()
.Send()
ENDWITH
Suerte