I have a vbs script that converts all word (*.doc) document from word to html, I need somebody to write an asp.net(vb) code to be able to pass the word document to the vbs file. then conversion will take place
Tip - Calling a .vbs file from asp.net
Passing parameter to .vbs file via asp.net
This project will fit a first time bidder, the code is below, I will only pay $30.00 max
So the first person to show me working code will get the 30 bucks, PLS pls only contact me, If u have a working solution.
Thanks
'*************************************************
Option Explicit
'declare all variables
Dim objWord
Dim oDoc
Dim objFso
Dim colFiles
Dim curFile
Dim curFileName
Dim folderToScanExists
Dim folderToSaveExists
Dim objFolderToScan
Dim strDocName
Dim intPos
'set some of the variables
folderToScanExists = False
folderToSaveExists = False
Const wdSaveFormat = 10 'for Filtered HTML output
Const wdFormatText = 10
'*******my MSN IS obinna_ekeAThotmialDOTcom*************************************
'change the following to fit your system
Const folderToScan = "C:Documents and SettingsAdministrator.SERVERDesktopmagic"
Const folderToSave = "C:Documents and SettingsAdministrator.SERVERDesktopmagic"
'********************************************
'Use FSO to see if the folders to read from
'and write to both exist.
'If they do, then set both flags to TRUE,
'and proceed with the function
Set objFso = CreateObject("Scripting.FileSystemObject")
If [login to view URL](folderToScan) Then
folderToScanExists = True
Else
MsgBox "Folder to scan from does not exist!", 48, "File System Error"
End If
If [login to view URL](folderToSave) Then
folderToSaveExists = True
Else
MsgBox "Folder to copy to does not exist!", 48, "File System Error"
End If
If (folderToScanExists And folderToSaveExists) Then
'get your folder to scan
Set objFolderToScan = [login to view URL](folderToScan)
'put al the files under it in a collection
Set colFiles = [login to view URL]
'create an instance of Word
Set objWord = CreateObject("Word.Application")
If objWord Is Nothing Then
MsgBox "Couldn't start Word.", 48, "Application Start Error"
Else
'for each file
For Each curFile in colFiles
If ([login to view URL](curFile) = "doc") Then
'get the filename without extension
curFileName = [login to view URL]
curFileName = Mid(curFileName, 1, InStrRev(curFileName, ".") - 1)
[login to view URL] [login to view URL](curFile)
[login to view URL] = False
Set oDoc = [login to view URL]
[login to view URL] folderToSave & curFileName & ".htm", wdSaveFormat
[login to view URL]
Set oDoc = Nothing
End If
Next
End If
[login to view URL]
Set objWord = Nothing
Set colFiles = Nothing
Set objFolderToScan = Nothing
End If
Set objFso = Nothing
'*********************************