Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EMail with Outlook
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
EMail with Outlook
Divers
Thread ID:
00838234
Message ID:
00838234
Vues:
84
Hi,

Does anyone see a problem with the following code?:

The error is that VFP does not recognize oSendTo as a collection.

Thanks


loApp = CREATEOBJECT("Outlook.application")
loSpace = loApp.GetNameSpace("MAPI")
loMsg = loSpace.GetDefaultFolder(6)
loNew = loMsg.Items.ADD()
loNew.Subject = "REVIEW NOTICE"

oSendTo = loNew.Recipients.Add("jc@igc.com")

loNew.Body = "Hi,"+CHR(13)+CHR(13)+;
"Please review document"

loNew.Display()

WAIT WINDOW "Press any key after sending EMail"

IF !ISNULL(loApp)
FOR EACH loRcp IN oSendTo.Items
IF !ISNULL(oSendTo.Name)
INSERT INTO freview (dwg, recepient, submit_dt) ;
VALUES (lcFile,loRcp.Name,DATETIME())
ENDIF
ENDFOR
ELSE
loApp = .NULL.
ENDIF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform