Bu şekilde yapabilirsiniz:
'
' UnZip 1 file from a zip file:
'
Function entUnZip1File(ByVal strZipFilename, ByVal strDstDir, _
ByVal strFilename)
'
Const glngcCopyHereDisplayProgressBox = 256
'
Dim intOptions, objShell, objSource, objTarget
'
' Create the required Shell objects
Set objShell = CreateObject("Shell.Application")
'
' Create a reference to the files and folders in the ZIP file
Set objSource = _
objShell.NameSpace(strZipFilename).Items.item(CStr(strFilename))
'
' Create a reference to the target folder
Set objTarget = objShell.NameSpace(strDstDir)
'
intOptions = glngcCopyHereDisplayProgressBox
'
' UnZIP the files
objTarget.CopyHere objSource, intOptions
'
' Release the objects
Set objSource = Nothing
Set objTarget = Nothing
Set objShell = Nothing
'
entUnZip1File = 1
'
End Function
Ve makro C dosyayı ayıklamak için işlevini çağırmak herhangi bir yerde: \ temp dizinine veya onun yerine C herhangi bir hedef klasöre: \ temp:
entUnZip1File "C:\archive1.zip", "C:\temp", "folderlevel1/folderlevel2/folderlevel3/Myfile.csv"
bakınız burada örnek 2: http://www.rondebruin.nl/win/s7/win002.htm –