Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automating Outlook with VFP
Message
From
24/06/1999 14:55:42
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00233626
Message ID:
00233636
Views:
24
>I'm trying to "semi-automatically" send email from VFP using Outlook but am having a little problem. I can send email invisibly but can't bring up the pre-defined email to be sent for end-user modifications.
>
>Here's my code:
>
>oOutlook = ""
>oOutlookMessage = ""
>oOutlook = CreateObject("Outlook.Application")
>oOutlookMessage = oOutlook.CreateItem(0)
>oOutlookMessage.To = "John Doe"
>oOutlookMessage.Subject = lcSubject
>oOutlookMessage.Body = lcMessageBody
>oOutlookMessage.Attachments.Add(ListInstructionsFile+".TXT")
>oOutlookMessage.Attachments.Add(TestListInstructionsFile+".TXT")
>oOutlookMessage.Send
>
>Above code works great but is not what I want. I need for the user to select the "To" interactively rather than done programmatically. If I use the MAPI way, I can issue oObjectRef.Send(.T.) to bring up the interface but how do I do it with Outlook?

If there's another way, I'd sure like to know about it. But the only way I know would be to use the MAPI ActiveX controls to bring up the dialog for selection, then take the selected recipient from there and load it into the Outlook object property. Hopefully there's another way. :-)

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform