hi
i am using this code to make the dll to convert the (.doc) to (.html) but it is not wroking will anyon e can hlp me out
rajindar




Option Explicit

Dim WordApp As Word.Application
Dim WordDoc As Word.Document

Public Function convert(ByVal dirpath As String) As String
Dim strName As String
Dim FileName As String
Dim c As Integer
Dim objFSO As Variant
Dim objFolder, objFile, objFiles As Variant



Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(dirpath)
Set objFiles = objFolder.Files
Set WordApp = CreateObject("Word.Application")

objFile.Name = "E:\CMT\CMT\RAJINDAR\cover.doc"

WordApp.ChangeFileOpenDirectory (dirpath)

'For Each objFile In objFiles


If (objFSO.GetExtensionName(dirpath & objFile.Name)) = "DOC" Or (objFSO.GetExtensionName(dirpath & objFile.Name)) = "doc" Then
Set WordDoc = WordApp.Documents.Open(objFile.Name)
WordApp.Visible = False
FileName = Left(objFile.Name, InStr(objFile.Name, ".")) & "htm"


WordDoc.SaveAs FileName, wdFormatHTML
WordDoc.Close
c = c + 1
End If


'Next

WordApp.Quit SaveChanges:=wdDoNotSaveChanges
convert = "done " & c
End Function