We have a web application runnung on Windows Server 2003, Apache and MS Office 2003. Win32::Ole generates word documents initiated over a CGI form. All works pretty. Now I have to install a new server based on Windows Server 2008 R2 Standard with Office 2010.

Apache runs as priveleged user, but the script hangs on $word = Win32::OLE->new('Word.Application', sub {$_[0]->Quit;} till browser timeout message coming, no errors in perl($Win32::OLE::Warn = 3;), Apache or Windows. Seems to be Word waiting for a confirmation, but I can't see it ({visible} = 1).

use Win32::OLE; $Win32::OLE::Warn = 3; eval {$word = Win32::OLE->GetActiveObject('Word.Application')}; die "Word not installed" if $@; unless (defined $word) { $word = Win32::OLE->new('Word.Application', sub {$_[0]->Quit;}) or die "Oops, cannot start Word"; } $word->Activate; $word->{visible} = 1; my $doc = $word->Documents->Open("$oldfile"); ....... $word->ActiveDocument->SaveAs($newfile); $doc->Close(); $word -> Quit;

Can you halp me? Regards, wal77


In reply to win32::ole and MS Office 2010 over cgi by wal77

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.