473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert word document to text file?

25
Hi,
How do I convert a word document into a text file. (For eg: If I give input as file1.doc, my Perl program should automatically convert it into file1.txt)
Is there any Perl module which does this conversion?

I would appreciate your response!

Thanks in advance!
Sangith
Oct 20 '07 #1
5 5068
KevinADC
4,059 Expert 2GB
Are you referring to MS Word or Windows Wordpad? There are no perl modules for Wordpad (.doc) but there are plenty on CPAN for Word.
Oct 20 '07 #2
sangith
25
Are you referring to MS Word or Windows Wordpad? There are no perl modules for Wordpad (.doc) but there are plenty on CPAN for Word.

Hi Kevin,

I am referring to MS-Word document.

Thanks,
Sangith
Oct 20 '07 #3
numberwhun
3,509 Expert Mod 2GB
Hi Kevin,

I am referring to MS-Word document.

Thanks,
Sangith
Per Kevin's posting, go out to CPAN and search for word. Then, check all of the modules returned to see if any of them will do what you want. You have to research what you want to do before throwing your arms up and asking someone else.

Regards,

Jeff
Oct 20 '07 #4
Per Kevin's posting, go out to CPAN and search for word. Then, check all of the modules returned to see if any of them will do what you want. You have to research what you want to do before throwing your arms up and asking someone else.

Regards,

Jeff
You can use Perl's rename() method for renaming a file as
rename(sourcefile, destfile)
Nov 1 '07 #5
numberwhun
3,509 Expert Mod 2GB
You can use Perl's rename() method for renaming a file as
rename(sourcefile, destfile)
That would certainly rename the files, but renaming a file does not convert the format from one to another. A word document, by any other name is still a word document, unless of course you remove all of the formatting through conversion.

Regards,

Jeff
Nov 1 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: William Payne | last post by:
Hello, I need to write a program that opens a text file and scans the entire file for a specific line and when that line is found, a particular word on that line is to be replaced. The new word is...
1
by: ananth | last post by:
Hi All, Do anyone know how to get a word document in a rich text field and convert them into a HTML page programatically.The requirement is that there shouldnt be any third party tool...
1
by: firozfasilan | last post by:
I want the complete module for converting a word document to html file using visual basic 6 can you help me?
11
by: digbydog | last post by:
Hello, I have been looking at trying to find a third party product to convert a word document to a pdf is ASP DotNet. We previously did this in non web environnment using acrobat distiller but I...
0
by: okalpana | last post by:
Hi friends, trying to do a application program.. what is the code to open a existing word document or excel file in Visual Basic 5 with a command button. i.e Clicking th button should open a...
0
by: mzmishra | last post by:
Hi My requirement is to convert one existing word document to PDF using c#.net 1.1. Is it possible to do so.If yes please send me some code sample for the same.
2
by: ameesha | last post by:
hi all.. Can any one help me.. i am asked to develop a software in which one option is to search the first occurence of a particular word within a text file..and save the word and preceeding...
2
by: santhianche | last post by:
In java how to convert a jpg file text data into word document .
1
by: Clark Teh | last post by:
Hi, I am lost in coming up with an algorithm and syntax for vb.net to perform a task similar to vlookup function in excel. The text file contains a series of data with each data in a new line....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.