or maybe this one?
Public WithEvents objInboxItems As Outlook.Items Private Sub Application_Startup() Set objInboxItems = Session.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub objInboxItems_ItemAdd(ByVal Item As Object) Dim objMail As Outlook.MailItem Dim strSenderAddress As String Dim strSenderDomain As String Dim objAttachment As Attachment Dim strFolderPath As String Dim strFileName As String Dim strDesiredSender As String Dim strDesiredDomain As String strFolderPath = Environ("USERPROFILE") & "\Documents\" 'strDesiredDomain = "gmail.com" <-- change to suit strDesiredSender = "user@gmail.com" <-- Change to suit If Item.Class = olMail Then Set objMail = Item 'Get sender domain strSenderAddress = objMail.SenderEmailAddress strSenderDomain = Right(strSenderAddress, Len(strSenderAddress) - InStr(strSenderAddress, "@")) 'Use either strSenderDomain or strSenderAddress Depending on Filter Desired 'If strSenderDomain = strDesiredDomain Then If strSenderAddress = strDesiredSender Then If objMail.Attachments.Count > 0 Then For Each objAttachment In objMail.Attachments 'Save in format "Subject - Attachmentname" 'strFileName = objMail.Subject & " " & Chr(45) & " " & objAttachment.FileName 'objAttachment.SaveAsFile strFolderPath & strFileName 'Save in format exactly as attachment name objAttachment.SaveAsFile strFolderPath & objAttachment.FileName objMail.Delete 'Delete after saving attachment Next End If End If End If EndSub