General discussion

Locked

file convert vbscript - Lotus to Excel

By Johan101 ·
Hi
I'm writing a script to convert all my *.wk* and *.123 file to *.xls format
it searches directories and sub directories for the files , opens them and saves them in xls format.
it does not want to work.
its about 866+ files in different directories that I need to convert before end of month

all help is apreciated

thanks in advance

dim fso, ws, OFFICE_PATH, Result, file
filename="*.wk*"
startDir="c:\lotus\work\123\"
Set ws = CreateObject("Scripting.FileSystemObject")
Set folder = ws.GetFolder(startDir)
fList(folder)
wscript.quit
sub fList(folderObj)
for each file in folderObj.Files
if file.name=filename then

Set ws = WScript.CreateObject("WScript.Shell")

OFFICE_PATH = "C:\lotus\123"

ws.Run CHR(34)& OFFICE_PATH & "\123w.exe" & CHR(34) & file, 0, "FALSE"

WScript.Sleep 1500
ws.SendKeys "%(f)"
ws.SendKeys "a"
Result = Replace (file, "wk4", "xls")
ws.SendKeys Result
WScript.Sleep 1000
ws.Sendkeys "%(s)"
ws.Sendkeys "%{F4}"


exit for
end if
next
for each folder in folderObj.subfolders
fList(folder)
next
end sub

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums