Worked for me. I dont have office on my x64 Vista so I cant try that... are
you running x64?
--
Brandon Shell
---------------
Stop by my blog some time

Blog:
http://www.bsonposh.com/
PSH Scripts Project:
www.codeplex.com/psobject
--------------------------------------
"n3llyb0y" <n3llyb0y@aol.com> wrote in message
news:2007030909483416807-n3llyb0y@aolcom...
> Hi All,
>
> I've recently moved to Vista but one of my scripts that was using office
> 2007 no longer wants to work. I was hoping someone could shed some light
> on this.
>
> I'm calling the excel application
>
> $xl = new-object -comobject "excel.application"
>
> Then try to add a new workbook
>
> $xl.workbooks.add()
>
> and get this error:
>
> Exception calling "Add" with "0" argument(s): "Old format or invalid type
> library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
>
> any ideas?
>
> Cheers,
> Neil
>