Outlook VBA: ActiveX Component can't create object

G

Guest

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
 
G

Guest

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?
 
G

Guest

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.
 
G

Guest

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