Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Converting DOS-Word(5.5) to Winword(97)

by cacharbe (Curate)
on Oct 07, 2002 at 14:07 UTC ( #203330=note: print w/replies, xml ) Need Help??

in reply to Converting DOS-Word(5.5) to Winword(97)

That converter comes with office, and can be installed when you install Word (which you will need to do). Make sure that it is installed, and then just open the document in word, save as Current Word document, rinse, repeat.

Specifically, you are looking at using Win32::OLE. Here is some code to get you started:

use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Word'; $Win32::OLE::Warn = 3; my $Word = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new('Word.Application', 'Quit'); my $docname; ##PUT AN EXAMPLE DOCNAME HERE $Word->{'Visible'} = 1; $Word->Documents->Open ($docname) or die"Unable to create document ".W +in32::OLE->LastError()."\n"; $Word->Documents->ActiveDocument->SaveAs({FileName=>'NEWFILENAME', FileFormat=>wdFormatDocument});


Flex the Geek

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203330]
[holli]: And I kindly suggest you post a question, instead of spamming the chetterbox
[holli]: my spelling... can you actually aquire dyslexia?
[LanX]: SoPW = Seekers of Perl Wisdom, the section for asking and answering general Perl questions. A form for asking a new Perl question can be found at the bottom of that page. (Be sure to read Posting on PerlMonks before posting!)
[Corion]: r@j: Have you printed what '$Process_java' prints? How will Perl know that you mean a variable named $Process and not a variable named $Process_java? Also, why doesn't Perl complain when you're using strict in your program?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (15)
As of 2017-10-23 15:35 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (280 votes). Check out past polls.