Solved

Resave a file automatically in word

Posted on 2011-03-09
6
326 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

830 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