![]() |
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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
#11
|
|||
|
|||
![]()
I understand your (and everyone else's) concern regarding this issue,
but there is a solution: leave Outlook open. Who doesn't leave it open all day to get meeting reminders, receive important emails from the boss, etc anyway? If you want to send an email without user interaction, and you must use Outlook, try using Redemption (http://www.dimastr.com/ redemption/). Or see http://www.rondebruin.nl/sendmail.htm for other tips. As a workaround, use GetObject to see if Outlook is open, and if it isn't, warn your end users (via MsgBox) that without Outlook open, their messages will be delayed. --JP On Nov 12, 3:17*pm, bobh wrote: On Nov 10, 6:17*pm, JP wrote: This might not be the answer you're looking for, but why not just leave Outlook open? --JP On Nov 10, 3:41*pm, "adma" u56099@uwe wrote: I have this code to send email using Excel macro, it works fine abut the message stays in outbox until i open outlook then it sends it. how i can send receive even if outlook closed? any help? thanks! Sub ComposeMail(strto As String, strSubject As String, strbody As String, strAttachment As String) * * Dim objOL As Outlook.Application * * Dim objX As Outlook.MailItem * * Set objOL = New Outlook.Application * * Set objX = objOL.CreateItem(olMailItem) * * With objX * * * * .To = strto * * * * .Subject = strSubject * * * * .Body = strbody * * * * If strAttachment "" Then * * * * * * .Attachments.Add strAttachment * * * * End If * * * * .BodyFormat = olFormatHTML * * * * .Display * * End With * * Application.Wait (Now + TimeValue("0:00:02")) * * Application.SendKeys "%s" End Sub- Hide quoted text - - Show quoted text - if his situation is like mine; I developed an Access application that has multiple users and I can not make the assumption that all the users will have Outlook open so when entering data on the Access data entry screen should they click the 'Notify Manager' button I want the Noticification email to be send in the background without user interaction and without having to ensure that Outlook is open which so far I have NOT been able to do using Outlook as the companies EMail client software. So the issue is why does Outlook but the email message in it's outbox instead of just sending it. bobh.- Hide quoted text - - Show quoted text - |
Ads |
#12
|
|||
|
|||
![]()
Thanks!
i will try and let you know which one works for me. JP wrote: I understand your (and everyone else's) concern regarding this issue, but there is a solution: leave Outlook open. Who doesn't leave it open all day to get meeting reminders, receive important emails from the boss, etc anyway? If you want to send an email without user interaction, and you must use Outlook, try using Redemption (http://www.dimastr.com/ redemption/). Or see http://www.rondebruin.nl/sendmail.htm for other tips. As a workaround, use GetObject to see if Outlook is open, and if it isn't, warn your end users (via MsgBox) that without Outlook open, their messages will be delayed. --JP This might not be the answer you're looking for, but why not just leave Outlook open? [quoted text clipped - 42 lines] - Show quoted text - -- Message posted via http://www.officekb.com |
#13
|
|||
|
|||
![]()
i used redemption, copied installed it added to reference library
i copied their example into a sub for testing Sub redemail() Dim SafeItem, oItem Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem Set oItem = Application.CreateItem(0) 'Create a new message SafeItem.Item = oItem 'set Item property SafeItem.Recipients.Add " SafeItem.Recipients.ResolveAll SafeItem.Subject = "Testing Redemption" SafeItem.Send End Sub here is the error run-time error '438': Object doesn't support this property or method at this line 'Set oItem = Application.CreateItem(0) 'Create a new message what shall i do? any help? JP wrote: I understand your (and everyone else's) concern regarding this issue, but there is a solution: leave Outlook open. Who doesn't leave it open all day to get meeting reminders, receive important emails from the boss, etc anyway? If you want to send an email without user interaction, and you must use Outlook, try using Redemption (http://www.dimastr.com/ redemption/). Or see http://www.rondebruin.nl/sendmail.htm for other tips. As a workaround, use GetObject to see if Outlook is open, and if it isn't, warn your end users (via MsgBox) that without Outlook open, their messages will be delayed. --JP This might not be the answer you're looking for, but why not just leave Outlook open? [quoted text clipped - 42 lines] - Show quoted text - -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...g-vba/200911/1 |
#14
|
|||
|
|||
![]()
You're in Excel, trying to use code written for Outlook. You need to
create an instance of Outlook.Application, then use that reference. i.e. Dim olApp As Outlook.Application Set olApp = CreateObject("Outlook.Application") Set oItem = olApp.CreateItem(0) 'Create a new message --JP On Nov 13, 3:10*pm, "adma via OfficeKB.com" u56099@uwe wrote: i used redemption, copied installed it added to reference library i copied their example into a sub for testing Sub redemail() Dim SafeItem, oItem Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem Set oItem = Application.CreateItem(0) 'Create a new message SafeItem.Item = oItem 'set Item property SafeItem.Recipients.Add " SafeItem.Recipients.ResolveAll SafeItem.Subject = "Testing Redemption" SafeItem.Send End Sub here is the error run-time error '438': Object doesn't support this property or method at this line 'Set oItem = Application.CreateItem(0) 'Create a new message what shall i do? any help? |
#15
|
|||
|
|||
![]()
i have this code which worked fine but still can not send it out unless i
open outlook i have outlook 2003 i am sooo sadddddd Sub redmail() Dim SafeItem, oItem Dim objOL As Outlook.Application Dim objX As Outlook.MailItem Set objOL = New Outlook.Application Set objX = objOL.CreateItem(0) Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Set oItem = objOL.CreateItem(0) 'Create a new message SafeItem.Item = oItem 'set Item property SafeItem.Recipients.Add " SafeItem.Subject = "Deamdn File" SafeItem.Recipients.ResolveAll SafeItem.Send End Sub adma wrote: thats exactly what is my problem, i have searched the net for solution but nothing yes. I have this code to send email using Excel macro, it works fine abut the message stays in outbox until i open outlook then it sends it. how i can send [quoted text clipped - 5 lines] post it. bobh. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...g-vba/200911/1 |
#16
|
|||
|
|||
![]()
Hi adma.
I was just browsing Outlook Object Model and found this Sub SendAndReceive(showProgressDialog As Boolean) Member of Outlook.NameSpace Remembering your request you could try objOL.Namespace.SendAndRecieve(False) No Guarantees as I haven't used it. (You might test Namespace to see if its null though.) "adma via OfficeKB.com" wrote: i have this code which worked fine but still can not send it out unless i open outlook i have outlook 2003 i am sooo sadddddd Sub redmail() Dim SafeItem, oItem Dim objOL As Outlook.Application Dim objX As Outlook.MailItem Set objOL = New Outlook.Application Set objX = objOL.CreateItem(0) Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Set oItem = objOL.CreateItem(0) 'Create a new message SafeItem.Item = oItem 'set Item property SafeItem.Recipients.Add " SafeItem.Subject = "Deamdn File" SafeItem.Recipients.ResolveAll SafeItem.Send End Sub adma wrote: thats exactly what is my problem, i have searched the net for solution but nothing yes. I have this code to send email using Excel macro, it works fine abut the message stays in outbox until i open outlook then it sends it. how i can send [quoted text clipped - 5 lines] post it. bobh. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...g-vba/200911/1 . |
#17
|
|||
|
|||
![]()
It did not help.
thanks! Old Man River wrote: Hi adma. I was just browsing Outlook Object Model and found this Sub SendAndReceive(showProgressDialog As Boolean) Member of Outlook.NameSpace Remembering your request you could try objOL.Namespace.SendAndRecieve(False) No Guarantees as I haven't used it. (You might test Namespace to see if its null though.) i have this code which worked fine but still can not send it out unless i open outlook [quoted text clipped - 29 lines] post it. bobh. -- Message posted via http://www.officekb.com |
#18
|
|||
|
|||
![]()
Another glance at the Outlook object browser would tell you why it won't
work: There is no Application.Namespace property. There is, however, an Application.Session property that returns a Namespace object, thus: objOL.Session.SendAndReceive(False), assuming you have a valid objOL (Outlook.Application) object. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "adma via OfficeKB.com" u56099@uwe wrote in message news:9f9cb9c53be43@uwe... It did not help. thanks! Old Man River wrote: Hi adma. I was just browsing Outlook Object Model and found this Sub SendAndReceive(showProgressDialog As Boolean) Member of Outlook.NameSpace Remembering your request you could try objOL.Namespace.SendAndRecieve(False) No Guarantees as I haven't used it. (You might test Namespace to see if its null though.) i have this code which worked fine but still can not send it out unless i open outlook [quoted text clipped - 29 lines] |
#19
|
|||
|
|||
![]()
not this one too, still cant have it send the email
Sue Mosher [MVP] wrote: Another glance at the Outlook object browser would tell you why it won't work: There is no Application.Namespace property. There is, however, an Application.Session property that returns a Namespace object, thus: objOL.Session.SendAndReceive(False), assuming you have a valid objOL (Outlook.Application) object. It did not help. [quoted text clipped - 18 lines] open outlook [quoted text clipped - 29 lines] -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...g-vba/200911/1 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2007 - how to set so it doesn't receive email when closed | susankr | Outlook - General Queries | 3 | January 13th 08 12:23 AM |
Send/Receive doe not work... I can send but not receive in Outlook | Aims | Outlook - General Queries | 0 | October 31st 06 01:44 AM |
Send email immediate when Outlook 2003 is closed? | directjj | Add-ins for Outlook | 1 | May 17th 06 03:36 PM |
Automatic send/receive times out; manual send/receive works fine | TN | Outlook - Installation | 1 | March 17th 06 10:45 PM |
Even when the program is closed, it continues to send and receive | Cuervo | Outlook - Installation | 0 | January 29th 06 11:40 PM |