I have a VB.net applications that runs on XP and creates a directory and creates an Excell workbook and saves it. But when I do the same in Vista , when it tries to create a directory to save the excel workbook, it gives me an error that the directory does not exist. If I create the directory manually, it still gives me the same error. Is there a COM call for office 2007 on Vista other than worksheet.SaveAs(FileName:=path). All else works on Vista apart from creating a directory and Saving Excell Worksheet.
I am frustrated so much. Please help!!!!!!!!!!!!!
VB.NET:
Public Function createDirectory(ByVal path As String) As String
Dim new_path As String
Try
If Directory.Exists(path) Then
Directory.GetDirectories(path)
new_path = path
Else
Directory.CreateDirectory(path)
new_path = path
End If
Catch ex As System.IO.DirectoryNotFoundException
Throw ex
Catch ex As Exception
Throw ex
End Try
Return new_path
End Function