2009/9/29  <armin.no...@aktion-mensch.de>:
>
> Hi,
>
> I want to write
> use Win32::OLE::Const 'Microsoft PowerPoint';
> instead of
> use Win32::OLE::Const Microsoft PowerPoint 9.0 Object Library';
>
> ... on one machine the first Notation works correctly on the other machine
> not, I get
> an error Message when Loading the TypeLib. Can anyone tell me what do
> I have to do, so the first on works?
>
> Cheers
> Armin

That's worked for me in the past. What error message do you get?

Perhaps a pointless reminder but the version numbers refer to the
version of MS Office you're running on the machine.

There's probably a better way to determine the Office version that a
machine is running but I have used the following successfully:

sub _DetermineExcelVersion
{
    for ( 7 .. 15 )
    {
        my $office_path =
          $Registry->{
"HKEY_LOCAL_MACHINE|Software|Microsoft|Office|$_.0|Excel|InstallRoot|Path"
          };

        if ( defined $office_path and -e "$office_path/EXCEL.exe" )
        {
            return $_;
        }
    }

    die "Excel not found on '$ENV{COMPUTERNAME}!'";
}


HTH,

Just in
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to