Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email com anexo no Outlook
Message
From
05/08/2002 12:18:22
 
 
To
05/08/2002 10:10:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00686136
Message ID:
00686199
Views:
35
This message has been marked as the solution to the initial question of the thread.
>Ja consegui criar o email e enviar, mas como eu incluio um anexo? Estou indo por este caminho:
>
>o = CreateObject("outlook.application")
>x = o.CreateItem(0)
>x.Subject = "assunto"
>x.Body = "texto"
>x.Recipients.Add("juliano@mynarski.com.br")
>x.Send
>
>[]'s

Juliano:

Aqui tem um exemplo que escrevi no Wiki de VFP:
http://fox.wikis.com/wc.dll?Wiki~AutomationExamples~VFP
#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(MAILITEM)

WITH oEmailItem
   .Recipients.Add("moe@3stooges.com") && uses the Recipients collection
   .Subject = "Automation sample"
   .Importance = IMPORTANCENORMAL
   .Body = "This is easy!"
   .Attachments.Add("c:\mydir\sample.txt") && Note that the fully qualified path and file is required.
   .Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject
HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform