VB and VBA Users Source Code: Performing a "Send and Receive" in Outlook
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Performing a "Send and Receive" in Outlook
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Sunday, May 13, 2001
Hits:
1080
Category:
Internet/Remote Comms
Article:
If your Outlook uses a dial up network to send emails then you will need to use the following function if you wish to send any emails in your Outbox. 'Purpose : Performs a "Send and Receive" in Outlook 'Inputs : N/A 'Outputs : Returns True on success 'Author : Andrew Baker 'Date : 25/03/2000 'Notes : The "Send and Receive" is performed asychronously. ' Code designed to be run in Outlook VBA Function SendReceiveAll() As Boolean Dim bCreatedOutlook As Boolean Dim oCtl As Office.CommandBarControl Dim oCB As Office.CommandBar On Error GoTo ErrorHandler Set oCB = Application.ActiveExplorer.CommandBars("Standard") Set oCtl = oCB.Controls("Send/Receive") oCtl.Execute SendReceiveAll = True ErrorHandler: Debug.Print Err.Description SendReceiveAll = False End Function
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder