Code: Alles auswählen
Sub copyBackupToHarddrive
' load TOOLS library with helper function
If NOT GlobalScope.BasicLibraries.isLibraryLoaded( "Tools" ) Then
GlobalScope.BasicLibraries.LoadLibrary( "Tools" )
End If
If ThisComponent.hasLocation() Then
extraDrivePath = "/zentrale/firma/2008/"
fn = FileNameoutofPath( ThisComponent.getURL() )
ThisComponent.storeToURL( ConvertToURL( extraDrivePath & fn ), Array() )
Else
msgbox "Datei hat keine URL - kann keine Kopie erstellen ",, "copyBackupToHarddrive"
End If
End Sub
b) Pfadinformation in der Variablen extraDrivePath anpassen
c) Bei jeder Datei, die so gesichert werden soll, das Makro unter Extras>Anpassen...>Ereignisse>Datei wurde gesichert zuordnen.
Eine vorhandene Kopie wird ohne Rückfrage überschrieben!
Viel Spass damit!