![]() |
Getting Outlook to Send/Receive
Greeetings!
I have some code to send mail using VBA that works great at my office, but unfortunately at home, I need to do a manual "Send/Receive" to get it to work. Is there a way I can automatically get Outlook to Send/Receive every time a new message is ready, or maybe modify this code so it forces a Send/Receive? Thanks in advance! Joey Sub MailDoc(SubjectLine, MessageBody, Email) Set myRedMsg = CreateObject("Redemption.SafeMailItem") Set myOlApp = CreateObject("Outlook.Application") Set myItem = myOlApp.CreateItem(olMailItem) myItem.To = Email myItem.Subject = SubjectLine myItem.Body = MessageBody myRedMsg.Item = myItem myRedMsg.Send End Sub |
Getting Outlook to Send/Receive
See http://www.outlookcode.com/threads.a...essageid=16184 for
some information on that. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Joey Lichtenstein" wrote in message ... Greeetings! I have some code to send mail using VBA that works great at my office, but unfortunately at home, I need to do a manual "Send/Receive" to get it to work. Is there a way I can automatically get Outlook to Send/Receive every time a new message is ready, or maybe modify this code so it forces a Send/Receive? Thanks in advance! Joey Sub MailDoc(SubjectLine, MessageBody, Email) Set myRedMsg = CreateObject("Redemption.SafeMailItem") Set myOlApp = CreateObject("Outlook.Application") Set myItem = myOlApp.CreateItem(olMailItem) myItem.To = Email myItem.Subject = SubjectLine myItem.Body = MessageBody myRedMsg.Item = myItem myRedMsg.Send End Sub |
All times are GMT +1. The time now is 11:29 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com