Outlook VBA: ActiveX Component can't create object

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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?
 
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.
 
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
 
Back
Top