Discussion:
Unable to send mail from Outlook 2007 using Visual Basic 6.0 Code.
(too old to reply)
Ashok
2008-09-09 11:29:01 UTC
Permalink
Hi Everyone,

In outlook 2007, the following code is not working properly. This is add-in
project built using Visual basic 6.0.

----------------------------------------

Set oOutbox = m_oOutlook.Session.GetDefaultFolder(olFolderOutbox)
oMovedMail.Item = oCurMail.Move(oOutbox)
oMovedMail.Send


Variable usage FYI...

Dim oCurMail as object
Set oCurMail = CreateObject("Test.USafeMailItem")

' Parameter
ByRef objMail As Outlook.MailItem

Dim oMovedMail As Object
Set oCurMail = CreateObject("Test.USafeMailItem")
' Get the current mail item.
oCurMail.Item = objMail

Dim oOutbox As Object

----------------------------------------

The followings are the observations;

Case 1 : Some time, the mail is going out to the receiver, but it stayed at
outbox.
Case 2 : Some time, the mail is not all going out, it stayed at outbox itself.


Could you please tell that what is the actual issues which cause the
functionality? Do I need to change the coding flow for outlook 2007?

Note : This is absolutely working fine in prior to 2007.
I pasted only the important code fyi. I ensure that there is no runtime err
or logical err.

Your adivse would be appreciated on this.

Thx in Advance,
Ashok
Jan Hyde (VB MVP)
2008-09-09 14:20:09 UTC
Permalink
Ashok <***@discussions.microsoft.com>'s wild thoughts were
released on Tue, 9 Sep 2008 04:29:01 -0700 bearing the
Post by Ashok
Hi Everyone,
When it gets stuck in the out tray, look in the outbox and
tell me what it says in the 'sent' column.

J
Post by Ashok
In outlook 2007, the following code is not working properly. This is add-in
project built using Visual basic 6.0.
----------------------------------------
Set oOutbox = m_oOutlook.Session.GetDefaultFolder(olFolderOutbox)
oMovedMail.Item = oCurMail.Move(oOutbox)
oMovedMail.Send
Variable usage FYI...
Dim oCurMail as object
Set oCurMail = CreateObject("Test.USafeMailItem")
' Parameter
ByRef objMail As Outlook.MailItem
Dim oMovedMail As Object
Set oCurMail = CreateObject("Test.USafeMailItem")
' Get the current mail item.
oCurMail.Item = objMail
Dim oOutbox As Object
----------------------------------------
The followings are the observations;
Case 1 : Some time, the mail is going out to the receiver, but it stayed at
outbox.
Case 2 : Some time, the mail is not all going out, it stayed at outbox itself.
Could you please tell that what is the actual issues which cause the
functionality? Do I need to change the coding flow for outlook 2007?
Note : This is absolutely working fine in prior to 2007.
I pasted only the important code fyi. I ensure that there is no runtime err
or logical err.
Your adivse would be appreciated on this.
Thx in Advance,
Ashok
--
Jan Hyde (VB MVP)

https://mvp.support.microsoft.com/profile/Jan.Hyde

Continue reading on narkive:
Search results for 'Unable to send mail from Outlook 2007 using Visual Basic 6.0 Code.' (Questions and Answers)
3
replies
what is DNS?what is Active Directory?what is patch file?
started 2006-10-10 03:15:22 UTC
computer networking
Loading...