Einzelnen Beitrag anzeigen

Delphi.Narium

Registriert seit: 27. Nov 2017
2.508 Beiträge
 
Delphi 7 Professional
 
#6

AW: neue Microsoft Dateien

  Alt 1. Aug 2021, 17:02
Programme?

Excel?

https://stackoverflow.com/questions/...ch-file-or-vba

Code:
Sub TransformAllXLSFilesToXLSM()
Dim myPath As String

myPath = "C:\Excel\"
WorkFile = Dir(myPath & "*.xls")

Do While WorkFile <> ""
    If Right(WorkFile, 4) <> "xlsm" Then
        Workbooks.Open FileName:=myPath & WorkFile
        ActiveWorkbook.SaveAs FileName:= _
        myPath & WorkFile & "m", FileFormat:= _
        xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
        ActiveWorkbook.Close
     End If
     WorkFile = Dir()
Loop
End Sub
Und für die anderen Officeprogramme analog.
  Mit Zitat antworten Zitat