Searching, I have located how to download the files from an email to the folder I need, now I find the problem that is compressed in .zip and I have to unzip them to load them in the database.
Searching, I have seen this code, which gives me an error in the last step. They can help me, I do not know where the error is and looking for nothing. Thanks.
Sub Descomprimir()
Dim Destino As String
Dim Origen As String
Dim oApp As Object
Destino = "C:\Users\PTbarbera\Desktop\descagasDatos\pruebaZip"
Origen = "C:\Users\PTbarbera\Desktop\descagasDatos\prueba.zip"
Set oApp = CreateObject("Shell.Application")
oApp.NameSpace(Destino).CopyHere
oApp.NameSpace(Origen).Items
End Sub
The last step is the one that gives me the error: oApp.NameSpace(Destino).CopyHere oApp.NameSpace(Origen).Items
.
Do not know if I have to activate a reference?