![]() |
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 |
#1
|
|||
|
|||
![]()
All,
I've got an application that automates Outlook 2003. Up until recently, everything was working fine. Then, all of the sudden, an issue started appearing. Here's the details. 1) When Outlook was not open (running in the background via the CreateObject("Outlook Application"), the email would not be sent, and would appear in the Inbox Folder with the message "This message has not been sent" in a gray bar across the top. 2) With Outlook open (appearing in the task bar), the email would be sent as it should. No issues would be encountered. Any and all help would be appreciated!! I'm about at my wits end. |
Ads |
#2
|
|||
|
|||
![]()
Right after creating an instance of the Outlook Application object, call
Namespace.Logon: set App = CreateObject("Outlook Application") set NS = App.GetNamespace("MAPI") NS.Logon Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "JEB" wrote in message ... All, I've got an application that automates Outlook 2003. Up until recently, everything was working fine. Then, all of the sudden, an issue started appearing. Here's the details. 1) When Outlook was not open (running in the background via the CreateObject("Outlook Application"), the email would not be sent, and would appear in the Inbox Folder with the message "This message has not been sent" in a gray bar across the top. 2) With Outlook open (appearing in the task bar), the email would be sent as it should. No issues would be encountered. Any and all help would be appreciated!! I'm about at my wits end. |
#3
|
|||
|
|||
![]()
Sir,
Thank you VERY MUCH!!! Your code snippet worked. Does this "Namespace.Logon" apply to all versions of Outlook, or to just Outlook 2003 and later? Also, Did was there an update to Outlook that would start causing this? "Dmitry Streblechenko" wrote: Right after creating an instance of the Outlook Application object, call Namespace.Logon: set App = CreateObject("Outlook Application") set NS = App.GetNamespace("MAPI") NS.Logon Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "JEB" wrote in message ... All, I've got an application that automates Outlook 2003. Up until recently, everything was working fine. Then, all of the sudden, an issue started appearing. Here's the details. 1) When Outlook was not open (running in the background via the CreateObject("Outlook Application"), the email would not be sent, and would appear in the Inbox Folder with the message "This message has not been sent" in a gray bar across the top. 2) With Outlook open (appearing in the task bar), the email would be sent as it should. No issues would be encountered. Any and all help would be appreciated!! I'm about at my wits end. |
#4
|
|||
|
|||
![]()
It works in all versions of Outlook.
I doubt it has anything to do with a particular version, but rather with whether Outlook was already running by the time your code was executed or not. If it was already running, you don't need to call Logon. If you do not call Logon, Outlook tries to be "smart" and logs in implicitly only when it absolutely need to. All kinds of funny things can happen in the latter case... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "JEB" wrote in message ... Sir, Thank you VERY MUCH!!! Your code snippet worked. Does this "Namespace.Logon" apply to all versions of Outlook, or to just Outlook 2003 and later? Also, Did was there an update to Outlook that would start causing this? "Dmitry Streblechenko" wrote: Right after creating an instance of the Outlook Application object, call Namespace.Logon: set App = CreateObject("Outlook Application") set NS = App.GetNamespace("MAPI") NS.Logon Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "JEB" wrote in message ... All, I've got an application that automates Outlook 2003. Up until recently, everything was working fine. Then, all of the sudden, an issue started appearing. Here's the details. 1) When Outlook was not open (running in the background via the CreateObject("Outlook Application"), the email would not be sent, and would appear in the Inbox Folder with the message "This message has not been sent" in a gray bar across the top. 2) With Outlook open (appearing in the task bar), the email would be sent as it should. No issues would be encountered. Any and all help would be appreciated!! I'm about at my wits end. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003 - Before send automation | paredondo | Outlook - Installation | 5 | February 2nd 07 04:02 PM |
Outlook 2003 - Before send automation | paredondo | Outlook - Using Forms | 0 | January 31st 07 03:25 PM |
Outlook Automation | Tylendal | Outlook and VBA | 3 | April 24th 06 03:39 PM |
Outlook automation using vbs | Marceepoo | Outlook - Installation | 1 | January 17th 06 05:18 AM |
Help on Outlook automation | Neo | Outlook - General Queries | 1 | January 15th 06 05:49 PM |