A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Getting Outlook to Send/Receive



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 19th 06, 05:35 AM posted to microsoft.public.outlook.program_vba
Joey Lichtenstein
external usenet poster
 
Posts: 1
Default 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



Ads
  #2  
Old April 19th 06, 04:00 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can receive email but not send from outlook xp Brian's dragons Outlook - Installation 0 March 28th 06 10:29 PM
Automatic send/receive times out; manual send/receive works fine TN Outlook - Installation 1 March 17th 06 11:45 PM
Want to receive msgs to Inbox without activating Send/Receive tab Jerryblu Outlook - Installation 1 March 6th 06 10:01 PM
can not Send/receive using Outlook 2003 gp Outlook - General Queries 1 March 6th 06 02:46 PM
Outlook can send but not receive clayblay Outlook - Installation 0 February 8th 06 12:21 AM


All times are GMT +1. The time now is 03:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.