Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag and Drop email message from Outlook
Message
From
13/06/2006 17:21:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01128623
Message ID:
01128845
Views:
24
>>I can drag & drop an email message from Outlook into Windows Explorer and it creates a .MSG file.
>>
>>How can I do that in Visual FoxPro? I want to drag & drop a message from Outlook to a VFP form when the .msg file would be placed into a specified directory (held as a form property).
>>
>>I can only seem to access the subject,contents, date and size of the dropped object.
>>
>
>Take a look at http://www.codeproject.com/csharp/testemaildragdrop.asp?df=100&forumid=51309&select=1092474#xx1092474xx

Sergey,
Thanks for the pointer. I'm sure the answer is there, but I can't quite get it to work -
=GETOBJECT("o", "Outlook.Application")
FOR EACH i in o.ActiveExplorer.Selection()
	i.SaveAs("c:\temp\test.msg")
NEXT
The FOR EACH line indicates a syntax error and I can't see what is wrong with it.

I have tried having a single email item selected in Outlook and reducing the offending line of code to
o.ActiveExplorer.Selection(1).SaveAs("c:\temp\test.msg")
but then I get an OLE error: Parameter not optional.


Any advice greatly welcomed!
Thanks
Barry Sutton
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform