Hi Everybody,
In combination with rules & alerts I manage to automatically save a certain ZIP file (containing 1 file) to a directory specified below.
However, to be able to work with this file in a macro it has to be automatically extracted in this directory as well. Doing this extract, the file needs to get todays date because the purpose is to have updated figures in the same directory every day. Could somebody help me out please ? I already had a look at simular post and solutions like "http://www.rondebruin.nl/win/s7/win002.htm", but as I am all knew at this I can't figure out to make it work for my particular case.
If the only code that exists is to difficult to implement for a beginner, a piece of code to let me work with ZIP files in my VBA excel would help me out as well of course.
Thank you in advance.
Kind Regards
Joeri
In combination with rules & alerts I manage to automatically save a certain ZIP file (containing 1 file) to a directory specified below.
However, to be able to work with this file in a macro it has to be automatically extracted in this directory as well. Doing this extract, the file needs to get todays date because the purpose is to have updated figures in the same directory every day. Could somebody help me out please ? I already had a look at simular post and solutions like "http://www.rondebruin.nl/win/s7/win002.htm", but as I am all knew at this I can't figure out to make it work for my particular case.
Code:
Public Sub Save118(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
Dim StrYear As String
Dim DateFormat As String
StrYear = Year(Date)
DateFormat = Format(Now, "dd-mm-yyyy")
saveFolder = "T:\Transfer\Business Intelligence\Sales planning\Archive\AMlink report archive\118EMEA\" & StrYear
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & DateFormat & " " & objAtt.DisplayName
Set objAtt = Nothing
Next
If the only code that exists is to difficult to implement for a beginner, a piece of code to let me work with ZIP files in my VBA excel would help me out as well of course.
Thank you in advance.
Kind Regards
Joeri