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

Outlook 2003 Automation - Emails not being sent and going into Inb



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 8th 07, 05:29 PM posted to microsoft.public.outlook.program_vba
JEB
external usenet poster
 
Posts: 5
Default Outlook 2003 Automation - Emails not being sent and going into Inb

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  
Old June 8th 07, 06:59 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Outlook 2003 Automation - Emails not being sent and going into Inb

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  
Old June 8th 07, 07:08 PM posted to microsoft.public.outlook.program_vba
JEB
external usenet poster
 
Posts: 5
Default Outlook 2003 Automation - Emails not being sent and going into

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  
Old June 8th 07, 07:29 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Outlook 2003 Automation - Emails not being sent and going into

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
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
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


All times are GMT +1. The time now is 08:17 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-2025 Outlook Banter.
The comments are property of their posters.