Microsoft KB Archive/189599

From BetaArchive Wiki
Knowledge Base


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.

REFERENCES

For additional information, please see the following articles in the Microsoft Knowledge Base:

185314 OL97: E-mail Does Not Leave the Outbox


162343 OL97: How to Troubleshoot Mail Stuck in the Outbox


185313 OL98: (IMO) E-mail Does Not Leave the Outbox


182572 OL98: How to Troubleshoot Mail Stuck in the Outbox


(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Dean Christopher, Microsoft Corporation.


Additional query words: kbAutomation kbVFp300b kbVFp300 kbVFp500 kbVFp500a kbMAPI

Keywords: kbhowto KB189599