ich möchte gern aus Word heraus eine Exceldatei anlegen. Das funktioniert so weit, aber ich kann diese Datei später aus dem Windowsverzeichnis nicht öffnen.
Weiß einer Rat?
Sub test()
Dim xlApp As Object, xlMappe As Object, xlSheet As Object
Set xlApp = CreateObject("Excel.Application")
Set xlMappe = xlApp.Workbooks.Add
Set xlSheet = xlMappe.Worksheets(1)
xlSheet.Name = "Daten"
xlMappe.SaveAs FileName:=ActiveDocument.Path & "\test", _
FileFormat:=xlNormal
xlMappe.Close
xlApp.Quit
Set xlApp = Nothing
Set xlMappe = Nothing
Set xlSheet = Nothing
End Sub