Error 429 ActiveX can't create object

  • Thread starter Error 429 while creating outlook object
  • Start date
E

Error 429 while creating outlook object

I am trying to create outlook object using the following code in VB 6.0

set m_olApp=CreateObject("Outlook.Application")

It works only if outlook is not already open. If outlook is open then I get
"Error 429 ActiveX can't create object" message. However if I add reference
to outlook and create early binding object then it works. But I would like
to use late binding. Again it works on XP. The problem occurs only on
Vista. I am using office 2007. Can someone please let me know what I am
doing wrong?

Thanks in advance
 
R

Rod Gill

Probably the application will only allow one instance to run at a time. Any
attempt to create a second instance is raising an error. Use:

on error resume next
set m_olApp=GetObject(,"Outlook.Application")
if m_olApp is nothing then
set m_olApp=CreateObject("Outlook.Application")
end if

This works in VBA, not sure about VB6

Note this group is for Microsoft Project VBA and project Server programming,
so you may want to use an Outlook group in future!

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx


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


"Error 429 while creating outlook object" <Error 429 while creating outlook
object @discussions.microsoft.com> wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top