Solved

Resave a file automatically in word

Posted on 2011-03-09
6
317 Views
Last Modified: 2012-05-11
Is there a way I can run a script to look in a folder that has
wordpad files, open those files in word and resave them as
word files in another directory?

Thank you
0
Comment
Question by:cbones
  • 4
6 Comments
 
LVL 2

Expert Comment

by:alagurjan
ID: 35083594
To find all the files in a location and from this you have to select only the word files

Set fso = CreateObject("Scripting.FileSystemObject")
  sFolder = Wscript.Arguments.Item(0)
  If sFolder = "" Then
      Wscript.Echo "No Folder parameter was passed"
      Wscript.Quit
  End If
  Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
  Set folder = fso.GetFolder(sFolder)
  Set files = folder.Files

To copy the files from one location to other

dim filesys

set filesys=CreateObject("Scripting.FileSystemObject")

If filesys.FileExists("c:\sourcefolder\anyfile.txt") Then

filesys.CopyFile "c:\sourcefolder\anyfile.txt", "c:\destfolder\"
0
 

Author Comment

by:cbones
ID: 35083941
I'm sorry, I may have phrased my question wrong.  I am looking to search a directory that has txt files in it and resave those files as microsoft word files (.doc).
0
 
LVL 1

Expert Comment

by:lapsa22
ID: 35093458
Try this program, I have tried a small research, it is program - please do download and try this whether it meets the requirements or you might have to wait for someone else to write a script, which would be useful, until than try this!

http://www.datamystic.com/filewatcher.html
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 1

Accepted Solution

by:
lapsa22 earned 500 total points
ID: 35093479
For those experts who will be able to understand and solve this Question, just an idea .

Check this website, if it is help the program and it codes!

http://www.softinterface.com/Convert-Doc/Convert-Doc.htm
0
 
LVL 1

Expert Comment

by:lapsa22
ID: 35093494
This is the idea for the folder watcher, which is on my first comment! This is how it suppose to work, try that out! It worked for me...hope it works for you as well! Thanks! Read this link!

http://www.ozgrid.com/Services/word-document-converter.htm
0
 
LVL 1

Expert Comment

by:lapsa22
ID: 35093502
And this is the manual converter program which you see on my above comment!

http://www.busysoftorder.com/prog/cz/docconv.htm
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Word files to Wordpress Posts 2 52
execution of the windows script host failed. (access is denied.) 3 109
Problem to With line 4 57
VBA taking too long 5 15
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question