Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Outlook Automation
Message
From
14/08/2000 23:53:10
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00398593
Message ID:
00404810
Views:
25
Hi Vidar,

Steve nailed it. Attachments.Add(cFilename) is what you are looking for. Attachments are a collection for mail items.


>>>#DEFINE olFolderOutBox 4
>>>
>>>oOutLookObject = CreateObject("Outlook.Application")
>>>oNameSpace=oOutlookObject.GetNameSpace("MAPI")
>>>oOutBoxFolder=oNameSpace.GetDefaultFolder(olFolderOutBox)
>>>oEmailItem=oOutBoxFolder.Items.Add
>>>With oEmailItem
>>> .To = "i486dx@prodigy.net"
>>> .Subject = "Test email message"
>>> .Body = "Hello World"
>>> .Save
>>>EndWith
>
>What property should I use to attach a file to the message?
>
>With oEmailItem
> .To = "i486dx@prodigy.net"
> .Subject = "Test email message"
> .Body = "Hello World"
> .Attachment = doesn't work!
> .Save
>EndWith
>
>Are there any URL that has an overwiew of these properties?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform