I want to zip my file of my Desktop with help of MS Access 2007. Can it is possibleThank You in advance.
I want to zip my file of my Desktop with help of MS Access 2007. Can it is possibleThank You in advance.
What do you mean by 'zip my file of my Desktop'? Desktop is the computer display. Do you mean your database file?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
My database as well as jpg,doc,xls etc files which i want to zip(I mean to compress my file)
Here is code I use to create and fill zip file.
Dim strZip As String
'create empty zip folder
'found this on web, no idea what the Print line does but if it isn't there, this won't work
Open strZip For Output As #1
Print #1, "PK" & Chr$(5) & Chr$(6) & String(18, 0)
Close #1
'copy file into zip folder
Dim objApp As Object
Set objApp = CreateObject("Shell.Application")
'variable for source file doesn't seem to work
'also double parens not in original example code but won't work without
objApp.NameSpace((strZip)).CopyHere "drive\path\filename"
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
it provide run time error 75
Plz provide me creating zip folder code with zip folder name
thank you in advance
strZip is the zip file name
strZip = "drive\path\filename.zip"
The CopyHere drive\path\filename is the file to copy into zip.
Construct the drive\path\filename strings however you want.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.