Hi,
I'm running Apache as service on an NT 4.0 box right now.I have a script 
which very simply creates an excel workbook and saves it to the hard 
drive.
This script works fine stand-alone, and also works if Apache is started 
using my profile (local admin rights). However, if I try running it 
w/Apache started on System Profile, it dies silently. Unfortunately, my IS 
department isn't keen on the idea of using a user profile to start Apache, 
and insists on using the system profile. Anyone have a solution? Sample 
code below.

#!c:\perl\bin\perl.exe
use CGI;
$cgiobject= new CGI;
print $cgiobject->header;
use Win32::OLE;
        # use existing instance if Excel is already running
        eval {$ex = Win32::OLE->GetActiveObject('Excel.Application')};
        die "Excel not installed" if $@;
        unless (defined $ex) {
            $ex = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;})
                    or die "Oops, cannot start Excel";
        }
        # get a new workbook
        $book = $ex->Workbooks->Add()||print "Couldn't add.";
        #"Couldn't add" doesn't get printed.

        print Win32::OLE->LastError(); ###Not Reached

#etc.

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to