General information
Category:
Windows API functions
>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 is user interaction already, why not show the standard outlook message window instead? ( oOutlookMessage.Display ) That is, after filling all other message fields.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only