PC Review


Reply
Thread Tools Rate Thread

Cannot Create Activex Component

 
 
Duncan
Guest
Posts: n/a
 
      9th Apr 2009
Hi

Writing some code that accesses Outlook via the

CreateObject("Outlook.Application")

mechanism. It has suddenly stopped working and now says it cannot create the
activex component. I have uninstalled/reinstalled outlook to no avail.

Anyone with a fix for this?

Thanks

 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      9th Apr 2009
Are you running any anti-virus or firewall software that has a script
stopper, like McAfee or Norton/Symantec? Those can stop CreateObject() from
working.

Do you get the same thing if you try creating a Word.Application or
Excel.Application object using CreateObject()?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Duncan" <(E-Mail Removed)> wrote in message
news:4D601762-BBA1-495B-A17D-(E-Mail Removed)...
> Hi
>
> Writing some code that accesses Outlook via the
>
> CreateObject("Outlook.Application")
>
> mechanism. It has suddenly stopped working and now says it cannot create
> the
> activex component. I have uninstalled/reinstalled outlook to no avail.
>
> Anyone with a fix for this?
>
> Thanks
>


 
Reply With Quote
 
Duncan
Guest
Posts: n/a
 
      9th Apr 2009
Hi

I am running McAfee but have tried it with it turned off with no success.
Also tried to create Excel and that works fine. The nearest I have got to a
diagnosis is a posting I found elsewhere saying it was to do with
permissions/authorities, namely that VS runs with elevated privileges
(Administrator) and Outlook doesn't, so they clash. The prove that this may
have some validity is that if I shut Outlook and use the CreateObject method,
then the code runs.

What is baffling is why it suddenly stopped working when it originally
worked and/or why it ever worked if permissions are at the root of it all.

Does this make any sense to you?

Duncan

"Ken Slovak - [MVP - Outlook]" wrote:

> Are you running any anti-virus or firewall software that has a script
> stopper, like McAfee or Norton/Symantec? Those can stop CreateObject() from
> working.
>
> Do you get the same thing if you try creating a Word.Application or
> Excel.Application object using CreateObject()?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Duncan" <(E-Mail Removed)> wrote in message
> news:4D601762-BBA1-495B-A17D-(E-Mail Removed)...
> > Hi
> >
> > Writing some code that accesses Outlook via the
> >
> > CreateObject("Outlook.Application")
> >
> > mechanism. It has suddenly stopped working and now says it cannot create
> > the
> > activex component. I have uninstalled/reinstalled outlook to no avail.
> >
> > Anyone with a fix for this?
> >
> > Thanks
> >

>
>

 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      9th Apr 2009
McAfee has a script stopper that can be configured, unlike Norton's. I don't
use it so I don't know the details of how to configure the script stopper to
trust certain software, but it is possible.

Is this managed code you are using (VB.NET) or VBA code or VB6 code?

If it worked before and not now it's likely not a permissions issue. And I
run code in and out of VS versions all the time with no problems.

Did you recently install any addins or other code that accesses Outlook? I
have seen some cases where badly written managed code can prevent other code
from successfully calling CreateObject() or New() on the Outlook.Application
object. In my experiences with that it never happens to any Outlook addins,
just with standalone code. And the code works if that addin or synch program
is stopped from running.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Duncan" <(E-Mail Removed)> wrote in message
news:AD93312F-1F91-43A8-BD34-(E-Mail Removed)...
> Hi
>
> I am running McAfee but have tried it with it turned off with no success.
> Also tried to create Excel and that works fine. The nearest I have got to
> a
> diagnosis is a posting I found elsewhere saying it was to do with
> permissions/authorities, namely that VS runs with elevated privileges
> (Administrator) and Outlook doesn't, so they clash. The prove that this
> may
> have some validity is that if I shut Outlook and use the CreateObject
> method,
> then the code runs.
>
> What is baffling is why it suddenly stopped working when it originally
> worked and/or why it ever worked if permissions are at the root of it all.
>
> Does this make any sense to you?
>
> Duncan


 
Reply With Quote
 
Duncan
Guest
Posts: n/a
 
      9th Apr 2009
it is managed code (vb.net) in vs2008 using vsto3 therefore. I did have a
problem with the MS SMS addin around the same time but it has been
uninstalled and re-installed and appears to be working fine since.

As you suggest it could be an addin, I suppose I could try disabling them
one by one until I find it all works?

Duncan

"Ken Slovak - [MVP - Outlook]" wrote:

> McAfee has a script stopper that can be configured, unlike Norton's. I don't
> use it so I don't know the details of how to configure the script stopper to
> trust certain software, but it is possible.
>
> Is this managed code you are using (VB.NET) or VBA code or VB6 code?
>
> If it worked before and not now it's likely not a permissions issue. And I
> run code in and out of VS versions all the time with no problems.
>
> Did you recently install any addins or other code that accesses Outlook? I
> have seen some cases where badly written managed code can prevent other code
> from successfully calling CreateObject() or New() on the Outlook.Application
> object. In my experiences with that it never happens to any Outlook addins,
> just with standalone code. And the code works if that addin or synch program
> is stopped from running.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Duncan" <(E-Mail Removed)> wrote in message
> news:AD93312F-1F91-43A8-BD34-(E-Mail Removed)...
> > Hi
> >
> > I am running McAfee but have tried it with it turned off with no success.
> > Also tried to create Excel and that works fine. The nearest I have got to
> > a
> > diagnosis is a posting I found elsewhere saying it was to do with
> > permissions/authorities, namely that VS runs with elevated privileges
> > (Administrator) and Outlook doesn't, so they clash. The prove that this
> > may
> > have some validity is that if I shut Outlook and use the CreateObject
> > method,
> > then the code runs.
> >
> > What is baffling is why it suddenly stopped working when it originally
> > worked and/or why it ever worked if permissions are at the root of it all.
> >
> > Does this make any sense to you?
> >
> > Duncan

>
>

 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      9th Apr 2009
You can certainly try that.

Since it's VSTO 3 code I don't think the bug when opening Outlook in
"headless" from the original VSTO 2005 SE runtime would apply.

You might also want to review the information on debugging managed code
addins at
http://blogs.msdn.com/vsod/archive/2...-failures.aspx.
If there's some sort of loading issue you can examine what's going on with
the addin loading using the Fusion logging mentioned in that article.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Duncan" <(E-Mail Removed)> wrote in message
news:867BEDB6-AEFB-4054-8E0A-(E-Mail Removed)...
> it is managed code (vb.net) in vs2008 using vsto3 therefore. I did have a
> problem with the MS SMS addin around the same time but it has been
> uninstalled and re-installed and appears to be working fine since.
>
> As you suggest it could be an addin, I suppose I could try disabling them
> one by one until I find it all works?
>
> Duncan


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
does c# allow to create Activex component? DB Microsoft C# .NET 3 21st Jul 2005 09:25 AM
Cannot create ActiveX component? Brett Microsoft VB .NET 0 5th Jan 2005 04:09 PM
Help: ActiveX component can't create Matthew Gibbons Microsoft Access 2 10th Jun 2004 01:09 PM
Cannot Create ActiveX Component Steve Andrews Windows XP Basics 3 2nd Mar 2004 07:22 PM
ActiveX can't create component Sean Microsoft Access External Data 0 7th Oct 2003 05:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:06 AM.