Here try this
With wsActive
ExportPath = "C:\"
sTempFileName = ExportPath & Trim(.Name) & ".bat"
iFileNum = FreeFile
Open sTempFileName For Output As #iFileNum
Print #iFileNum, "@Echo off"
Print #iFileNum, "CLS"
Print #iFileNum, "c:"
Print #iFileNum, "cd\"
Print #iFileNum, "If exist dic.log del dic.log"
Print #iFileNum, "If exist err.log del err.log"
Print #iFileNum, "call dic.bat" & " " & Trim(.Name) & " " & "dic32" & " " & "c" & " " & "studies" & " " & "c" _
& " " & "studies"
End With
The reason it is not executing.... Your current directory is not set. I am forcing your current directory to be root of C, by adding to your batch file (change to suit your needs).