Outlook VBA: ActiveX Component can't create object

V

Vinay Pandey

I can't create the "Common Dialog Box" object inside my vba code in Outlook.
The offending section is:

dim cd as object
set cd = CreateObject( "UserAccounts.CommonDialog" )

I get the following:
err.Description = ActiveX component can't create object
err.Number = 429

This piece of code only fails on my computer and not on other computers on
our network.

I'm running the following:
Outlook 2003 11.8010.8028 SP2
VBA: 6.4.9972
Windows 2003 Standard Server R2, 5.2.3790 SP1 build 3790
 
V

Vinay Pandey

I didn't state this below, but I could use some help. I don't know why I
can't create certain objects, is it because of what I have installed on my
server, or is it somes security policy that doesn't allow some "create
objects".

For example, I *can* do the following

set cnn = CreateObject( "ADODB.Connection" )
debug.print typename(cnn) 'yields "Connection"

Does anyone have ideas as to how I should proceed?
 
E

Eric Legault [MVP - Outlook]

Your issue isn't Outlook related Vinay. It looks like whatever .dll
implements the UserAccounts.CommonDialog class (whatever that is) is not
registered on your computer.
 
V

Vinay Pandey

Thanks for the shove in the right direction.

set cd = CreateObject( "MSComDlg.CommonDialog" )

does work, and now I can "browse" for files. Apparently,
"UserAccounts.CommonDialog" only works on XP, not on 2003
 

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