By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

VB.Net and Outlook

P: n/a
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.

Any ideas?

Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
please provide more information about the app. You said it is written in
vb.net. Is it a rich client app or a web app? Are you using the .net
classes for sending mail? Can you post a snippet of code?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003, so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.
Any ideas?

Nov 21 '05 #2

P: n/a

Jan. 12, 2005

Windows XP Sp2 blocks ActiveX controls from being run. This is why
your ActiveX control is getting an error message. You should specify
somewhere in the computer settings that your control should be able to run.
Don't ask me how, :) but this is my opinion! Good luck!
Joseph MCAD
"John" wrote:
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.

Any ideas?

Nov 21 '05 #3

P: n/a
It is written in VB.Net 2002. It is a windows Application, not a Web app. I
don't know about the .Net classes for sending email...I am using the
Microsoft Outlook 11.0 Object Library. Code follows:

Dim olApp As Outlook.Application
olApp = CreateObject("Outlook.Application")
Dim olNs As Outlook.NameSpace
olNs = olApp.GetNamespace("MAPI")
olNs.Logon()
Dim olMail As Outlook.MailItem
olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
olMail.To = lsTo
olMail.Subject = lsTitle
olMail.Body = lsBody
CType(olMail, Outlook._MailItem).Send()
"Nick Malik [Microsoft]" wrote:
please provide more information about the app. You said it is written in
vb.net. Is it a rich client app or a web app? Are you using the .net
classes for sending mail? Can you post a snippet of code?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook

2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the

program.

Any ideas?


Nov 21 '05 #4

P: n/a
You are using an ActiveX control to send mail. I can't see that you are
using Outlook functionality per se.

I suggest that you recode this segment of the code to use the .Net
framework. ActiveX controls have security issues, and XP SP2 has specific
settings the can prevent an ActiveX control from loading.

You can use the System.Web.Mail classes to send e-mail or you can use one of
the open source or free .Net e-mail classes that don't require CDO under the
covers.

I stumbled on this one using google. Haven't tried it myself. There's an
open source smtp component on sourceforge as well.
http://www.dnzone.com/ShowDetail.asp?NewsId=674

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com...
It is written in VB.Net 2002. It is a windows Application, not a Web app. I don't know about the .Net classes for sending email...I am using the
Microsoft Outlook 11.0 Object Library. Code follows:

Dim olApp As Outlook.Application
olApp = CreateObject("Outlook.Application")
Dim olNs As Outlook.NameSpace
olNs = olApp.GetNamespace("MAPI")
olNs.Logon()
Dim olMail As Outlook.MailItem
olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
olMail.To = lsTo
olMail.Subject = lsTitle
olMail.Body = lsBody
CType(olMail, Outlook._MailItem).Send()
"Nick Malik [Microsoft]" wrote:
please provide more information about the app. You said it is written in vb.net. Is it a rich client app or a web app? Are you using the .net
classes for sending mail? Can you post a snippet of code?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.
We have one machine with XP service pack 1. It works fine there. This also was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook

2003,
so no upgrade was needed. On these machines, we get an error stating that "modAgentSys can not create activex component" which then crashes the

program.

Any ideas?


Nov 21 '05 #5

P: n/a

Jan. 12, 2005

Here is some code to send a basic message. The from property is
required...

Imports System.Web.Mail

dim mess as new mailmessage
mess.from = "fr*******@msn.com"
mess.to = "to*****@msn.com"
mess.body = "email's message"
mess.priority = mailpriority.high
mess.subject = "email subject"
'SmtpMail.Send and .SmtpServer methods are shared
smtpmail.smtpserver = "name of your smtp server"
smtpmail.send(mess)
messagebox.show("Your message has been sent.")

I didn't test this, but this is all there is to it! :) Have a great day!

Joseph MCAD

"Nick Malik [Microsoft]" wrote:
You are using an ActiveX control to send mail. I can't see that you are
using Outlook functionality per se.

I suggest that you recode this segment of the code to use the .Net
framework. ActiveX controls have security issues, and XP SP2 has specific
settings the can prevent an ActiveX control from loading.

You can use the System.Web.Mail classes to send e-mail or you can use one of
the open source or free .Net e-mail classes that don't require CDO under the
covers.

I stumbled on this one using google. Haven't tried it myself. There's an
open source smtp component on sourceforge as well.
http://www.dnzone.com/ShowDetail.asp?NewsId=674

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com...
It is written in VB.Net 2002. It is a windows Application, not a Web app.

I
don't know about the .Net classes for sending email...I am using the
Microsoft Outlook 11.0 Object Library. Code follows:

Dim olApp As Outlook.Application
olApp = CreateObject("Outlook.Application")
Dim olNs As Outlook.NameSpace
olNs = olApp.GetNamespace("MAPI")
olNs.Logon()
Dim olMail As Outlook.MailItem
olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
olMail.To = lsTo
olMail.Subject = lsTitle
olMail.Body = lsBody
CType(olMail, Outlook._MailItem).Send()
"Nick Malik [Microsoft]" wrote:
please provide more information about the app. You said it is written in vb.net. Is it a rich client app or a web app? Are you using the .net
classes for sending mail? Can you post a snippet of code?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
> Having a problem sending emails through vb.net. Our inhouse software
> automatically sends an email to the programming staff whenever an error is > encountered.
>
> This code works just fine on machines that are windows 2000 based. We
> recently upgraded from Outlook 2000 to Outlook 2003, and it still works. >
> We have one machine with XP service pack 1. It works fine there. This also > was upgraded from outlook 200 to outlook 2003.
>
> On two new machines, we have XP Service Pack 2. They came with outlook
2003,
> so no upgrade was needed. On these machines, we get an error stating that > "modAgentSys can not create activex component" which then crashes the
program.
>
> Any ideas?
>


Nov 21 '05 #6

P: n/a
John,

Can you see if this is maybe a solution for you

http://www.dimastr.com/redemption/

I don't know nothing of it only that it exist.

Cor
Nov 21 '05 #7

P: n/a
To make matters more confusing, we have a development machine that is XP Sp2
and the email works fine on it.

"Joseph MCAD" wrote:

Jan. 12, 2005

Windows XP Sp2 blocks ActiveX controls from being run. This is why
your ActiveX control is getting an error message. You should specify
somewhere in the computer settings that your control should be able to run.
Don't ask me how, :) but this is my opinion! Good luck!
Joseph MCAD
"John" wrote:
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.

Any ideas?

Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.