soadfan
Member
- Outlook version
- Outlook 2013 64 bit
- Email Account
- Office 365 Exchange
Hello there,
i have this issue which is described HERE (a screenshot of a MSO forum's thread)
Just for info i've added and 3 sec delay, but no luck:
and log:
Now if i can't make it w0rk i want to be able to enable all disabled rules with one click.
Can anyone help with code for this?
P.S. I tried few google results and tried to adapt them to my needs, but also with no luck
Best regards,
Peter
i have this issue which is described HERE (a screenshot of a MSO forum's thread)
Just for info i've added and 3 sec delay, but no luck:
Code:
Public Sub saveAttachtoDiskNL(itm As Outlook.MailItem)
Debug.Print "*** START NL_STT"
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
Dim dateFormat
Dim yearFolder
dateFormat = Format(itm.ReceivedTime, "dd-mm-yyyy_hh-mm-ss-AMPM_")
yearFolder = Format(itm.ReceivedTime, "yyyy-mm")
saveFolder = "D:\TLC\STT_NL\" & yearFolder & "\"
On Error Resume Next
MkDir saveFolder
On Error GoTo 0
For Each objAtt In itm.attachments
Debug.Print "Found: " & objAtt.FileName & " at " & dateFormat
If LCase(Right(objAtt.FileName, 4)) <> ".jpg" And LCase(Right(objAtt.FileName, 4)) <> ".png" Then
Debug.Print "Confirmed as acceptable file type: " & objAtt.FileName & " at " & dateFormat
objAtt.SaveAsFile saveFolder & dateFormat & "STT_NL" & LCase(Right(objAtt.FileName, 4))
Debug.Print "Successful save: " & objAtt.FileName & " at " & dateFormat
Debug.Print "Before wait:"; Now
Call WaitFor(3)
Debug.Print "After wait:"; Now
Set objAtt = Nothing
Debug.Print "Set objAtt = Nothing"
Debug.Print "-------------------------------------------------------------------------------------------"
End If
Next
End Sub
and log:
Code:
*** START NL_STT
Found: WORKBOOK_4YX80QR9J004S642E8Q6AYLNX.ZIP at 16-06-2016_06-34-10-AM_
Confirmed as acceptable file type: WORKBOOK_4YX80QR9J004S642E8Q6AYLNX.ZIP at 16-06-2016_06-34-10-AM_
Successful save: WORKBOOK_4YX80QR9J004S642E8Q6AYLNX.ZIP at 16-06-2016_06-34-10-AM_
Before wait:Mon 16 June 06:34:38 AM
After wait:Mon 16 June 06:34:41 AM
Set objAtt = Nothing
-------------------------------------------------------------------------------------------
Now if i can't make it w0rk i want to be able to enable all disabled rules with one click.
Can anyone help with code for this?
P.S. I tried few google results and tried to adapt them to my needs, but also with no luck
Best regards,
Peter