Microsoft KB Archive/189599

= How To Make Outlook Empty Mail from the Outbox w/OLE Automation =

Article ID: 189599

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q189599



SUMMARY
When you send an e-mail message to Outlook 97 or 98 using the MAPI OLE container controls in Visual FoxPro for Windows, your e-mail messages might not leave the Outbox.



MORE INFORMATION
One possible cause of this problem is that Outlook has the Internet Mail Only (IMO) option installed, you are working offline, and you have not made a remote connection.

If the e-mail message you sent is stuck in the Outbox, use the following code to force Outlook to send the message: oOutlook = GETOBJECT(,"Outlook.Application") oNameSpace= oOutlook.GetNamespace("MAPI") oFolder = oNameSpace.GetDefaultfolder(4)    && Go to Outbox, folder 4 oSend = oFolder.Items(1).Send               && Send waiting items To test this code, create a new e-mail message addressed to yourself. Save and close the message without sending it. Move this message to the Outbox and run the preceding code. This should make Outlook send the message.

