Thank you so much sir for giving us such a valuable knowledge without any charges with the help of you we can boost our career and knowledge too🙏🙏🙏🙏🇮🇳
@pradeeprawatvlogs8358
5 жыл бұрын
You’re my favourite sir
@davidjones5319
6 ай бұрын
Wow. Awesome! Extremely valuable
@WiseOwlTutorials
6 ай бұрын
Thanks for watching, David!
@Frenzy666
4 жыл бұрын
This video is the only thing that actually helped me save all attachments, every other tutorial on the web is kinda whack... couldnt get them to work. This vid is perfect. I also like that you actually explain the code as you write it.
@WiseOwlTutorials
4 жыл бұрын
Glad you found what you were looking for, thanks for watching!
@PrasenjitSarkarSingapore
4 жыл бұрын
Brilliant and highly relevant to our regular work! Thank you!
@bilgehankavlak5330
3 жыл бұрын
Very clear explanations. Worthy informations. Great job.Thank you so much.
@WiseOwlTutorials
3 жыл бұрын
Thank you Bilgehan!
@abaiqbal
Жыл бұрын
Thank you so much Andrew
@WiseOwlTutorials
Жыл бұрын
You're very welcome Aba, thank you for watching!
@MasterChelsea
2 ай бұрын
Sir, thank you a lot for this great video!
@johnmutethia3060
5 жыл бұрын
you are excelent! watching from KENYA
@liptonjh
Жыл бұрын
This was super helpful. Thanks!
@WiseOwlTutorials
Жыл бұрын
Cheers Jeff, happy to hear it helped!
@kashifkhanspecial
5 жыл бұрын
Hi Andrew, Thank you so much for the tutorial, now I have the idea that how can I play with the attachments. Thanks once again. Thanks Kashif
@julianfolino
4 жыл бұрын
Hi! I'm having a bug when I want to test it in Immediate (min: 3:55) the error appears to be in Set fol = ns.Folders(1).Folders("Foldername") Do you know what could be it?
@AN-qi6ye
Жыл бұрын
Could you find a solution to that? @wiseowltutorials
@vengion1379
5 жыл бұрын
You are awesome. Thank you so much for these videos.
@elevateddroneography247
3 жыл бұрын
Andrew great video, even I could get it to work! I do have one question. Is there a way for the macro to run automatically with Outlook open? What code do I need to add so I don’t have to run the macro...... Thanks!
@abhisheksaraswat6753
5 жыл бұрын
Hi Andrew, How we can download the attachment from the particular email or specific time period. for example: Someone share the excel files from last 2 month, and i want to save all the attachment of that specific email id for only last month. It can be possible. if Yes please help us.
@beckham7rick
5 жыл бұрын
You have an amazing channel... thank u for sharing
@lokeshvignesh7694
5 ай бұрын
Hi, i tried and I'm getting an error stating object could not be found for Folders which I set also the folder is available on outlook
@senorrobinson
4 жыл бұрын
Superb video! Thank you!
@harati6744
Жыл бұрын
Hi there! I follow th macro but when i try to access to my Inbox sub folder "Test" i don't get to it - i receive Run-time error - 2147221233 The attempted operation failed. An object could not be found. But my sub folder Test is there. How can i avoid that error?
@michaelhoule4827
2 жыл бұрын
When I run it its gets stopped on the folder step. any idea Set fol = ns.Folders(1).Folders("Scans")
@jarodpeterson7830
4 жыл бұрын
These videos are amazing! Thank you for sharing your knowledge. One question I have is will this code, when ran every time, re-save old files and cause duplicates? If so if there a line of code to insert that will pull all files once and then only pull the latest email received?
@krn14242
5 жыл бұрын
Thanks Andrew, great stuff
@TheJaebeomPark
3 жыл бұрын
Awesome
@WiseOwlTutorials
3 жыл бұрын
Thanks!
@inderjeetgehlot4480
2 жыл бұрын
i am getting error the operation failed. An object could not be found
@1526andrews
4 жыл бұрын
Hi Andrew, really useful video. Is there a line of code that I could to select attachments from emails sent on a certain date?
@murphy2870
2 жыл бұрын
this works great can someone tell me how to do this for a specific outlook subfolder and for only excel attachments thanks
@HeroSanjA
2 жыл бұрын
Hello, can you please tell ne how to download only e-mail, which have the word "gesamt" in the attachment name ? Thank you:)
@WiseOwlTutorials
2 жыл бұрын
Hi Alex! You can use the InStr function docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/instr-function or the Like operator docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/like-operator to check if the attachment name contains a particular string. I hope that helps!
@marcelofreitas4593
3 жыл бұрын
Hello, Andrew! Amazing job! Is there a way to unzip a file using VBA? Everyday, I receive a zip file in the Outlook. So, I need to unpack it manually to a folder and after that I use a VBA routine to manipulate the data. I would like to automatize the whole process. Can you help me? Thanks a lot for share your knowleadge.
@WiseOwlTutorials
3 жыл бұрын
Thanks Marcelo! Here's the basic code to unzip a folder into a separate existing folder: Dim sh As Object Set sh = CreateObject("Shell.Application") sh.Namespace(ThisWorkbook.Path & "\Unzipped Files").CopyHere _ sh.Namespace(ThisWorkbook.Path & "\Zipped Files.zip").Items And if you'd like to know what it all means, watch out for a video appearing soon!
@kendc4019
Жыл бұрын
Hi Andrew do you have the script for saving attachment and renaming it based on the subject of email?
@WiseOwlTutorials
Жыл бұрын
Hi Ken! Did you mean you wanted the code shown in the video? If so you can find a link in the video description to download the completed file. I hope it helps and thanks for watching!
@chrisholden6658
3 жыл бұрын
thanks for this it was really helpful. Can I point this to a windows folder where the outlook items are located instead of outlook itself? I receive an email with a zipfile attached. I have to unzip the contents of that file which has 30 days worth of emails each with an attachment. I can copy and paste them back in an outlook folder and run this but ideally would like to be able to run it against the windows folder. Thanks
@WiseOwlTutorials
3 жыл бұрын
Hi Chris! Yes, you can loop through email items stored in a Windows folder. There are several ways to do this, here's a simple one using the Dir function. It assumes that you have a folder called Emails containing the saved messages and a folder called Attachments in the same folder as the Excel file which contains your VBA code: Sub SaveAttachmentsFromFileSystem() Dim AttachmentsFolder As String Dim EmailFolder As String Dim EmailPath As String Dim olk As Outlook.Application Dim mi As Outlook.MailItem Dim at As Outlook.Attachment EmailFolder = ThisWorkbook.Path & "\Emails\" EmailPath = Dir(EmailFolder & "*.msg") If EmailPath = "" Then Exit Sub AttachmentsFolder = ThisWorkbook.Path & "\Attachments\" Set olk = New Outlook.Application Do Debug.Print EmailPath Set mi = olk.CreateItemFromTemplate(EmailFolder & EmailPath) mi.Display For Each at In mi.Attachments Debug.Print at.Filename at.SaveAsFile AttachmentsFolder & at.Filename Next at mi.Close olDiscard EmailPath = Dir Loop Until EmailPath = "" End Sub
@chrisholden6658
3 жыл бұрын
@@WiseOwlTutorials thanks so much, you are a gentleman and a scholar, a tea and biccie donation coming your way :-)
@SasiKumar-te1ir
5 жыл бұрын
Thank you very much sir🙏🏻I’ve learned a lot...could you please help to make a video for PDF macros using VBA (pull specific data from pdf and paste into excel)
@SasiKumar-te1ir
5 жыл бұрын
WiseOwlTutorials Thank you very much sir🤝...I will go through the above link now...however you will post a video for upcoming season.
@9901028711
Жыл бұрын
I need to save specific files (excel,word,pdf etc) to specific desktop folder specific subject line using macro code
@pannerselvammaruthachalam825
5 жыл бұрын
Hi sir thank you so much can you give us same code in early binding method please
@smhekma
4 жыл бұрын
Guessing there has to be an easy solution, but I can't figure out what I would need to add if I just wanted to save files that have some unique criteria in the file name. So in this section I want to add what I have in parenthesis in the first line, but I can't figure out how to translate this into VBA. For Each at In mi.Attachments (That includes "Calls and Transfers in at.Filename) 'Debug.Print vbTab, at.DisplayName, at.FileName, at.Size at.SaveAsFile "Y:\STATS\Processing\" & Format(mi.ReceivedTime, "yyyy-mm-dd hh-nn-ss ") & at.FileName
@beforedievisittheseplaces6369
8 ай бұрын
Getname space ("mapi") What is mapi i can't find previous definition of this please help
@WiseOwlTutorials
8 ай бұрын
Hi! MAPI is WIndows' Messaging API en.wikipedia.org/wiki/MAPI I hope it helps!
@Nassuvian_Celtic
4 жыл бұрын
Where is the outlook folder saved ? I receive an object not found error on the set Folder line.
@sumeetpatil4785
4 жыл бұрын
Code for collecting attachment from same subject mails..??
@PankajNegi007
2 жыл бұрын
Dear Sir, I had a query regarding VBA Code Attaching Active Excel workbook in outlook Sir I made a VBA Program where i copy and paste data in new workbook now i want to attached this new workbook in outlook file using "Application.Dialogs(xlDialogSendMail).Show" this Technique. Now when i run this macro in Step Into mode[F8] its working fine but when i run same macro Run mode(F5/Green Triangle Button) taking lots of time and showig this errors messages "cannot find this file verify the path and file name are correct". So Sir Please Help me on this matter. Sir if possible please Make vedio on this Topic (Application.Dialogs(xlDialogSendMail).Show)
@dmegnin
5 жыл бұрын
Great video. Nice clear instructions. Thank you! I followed them very carefully and I'm getting "An object could not be found" Run-time error on the Set fol = ns.Folders(1).Folders("David") line. I did add the reference to the Microsoft Outlook and double checked it. I checked the folder name. What could be the problem? Option Explicit Sub SaveOutlookAttachements() Dim ol As Outlook.Application Dim ns As Outlook.Namespace Dim fol As Outlook.Folder Dim i As Object Dim mi As Outlook.MailItem Set ol = New Outlook.Application Set ns = ol.GetNamespace("MAPI") Set fol = ns.Folders(1).Folders("David") For Each i In fol.Items If i.Class = olMail Then Set mi = i Debug.Print mi.SenderName, mi.ReceivedTime End If Next i End Sub
@dmegnin
5 жыл бұрын
@@WiseOwlTutorials Thank you. I'll try that. I did think of that, but it looked like your "Dell" folder was a subfolder also, so I didn't think it would matter. My "David" folder is only a subfolder of "Inbox." Is that considered the root level?
@dmegnin
5 жыл бұрын
I'll try .Folders("Inbox").Folders("David")
@dmegnin
5 жыл бұрын
That did not work either. Nor did just .Folders("Inbox") I'll refer to the other videos you linked.
@dmegnin
5 жыл бұрын
Well, I guess our organization is kind of odd. This is what worked for my Outlook folder structure: Set fol = ns.Folders(2).Folders("Inbox").Folders("David") Yeah, Folders(2) This video was extremely helpful. Thanks for the link to it. kzitem.info/news/bejne/1YGEv5t8a3N8qGU Thank you again for the great videos!
@irynamusiiovska828
4 жыл бұрын
Thank you!
@joebarto
3 жыл бұрын
I get a complier error saying ns variable not defined
@WiseOwlTutorials
3 жыл бұрын
Hi Joe, check that you have a Dim statement for the ns variable and that you've spelt it correctly (that sounds patronising but I've lost count of how many times I've misspelt a simple variable name and seen this compile error!)
@markmiller4659
2 жыл бұрын
How can this be automated when receiving a new email with an attachment in a subfolder I specify ? It works great when I run it manually but I can't get it to run when I receive a new email with an attachment. Thanks in advance!!! Your videos are awesome!!!
@WiseOwlTutorials
2 жыл бұрын
Hi Mark! You can use the NewMail event of the Outlook application to trigger code when mail is received docs.microsoft.com/en-us/office/vba/api/outlook.application.newmail I hope it helps!
@markmiller4659
2 жыл бұрын
@@WiseOwlTutorials Thank you so much!!!!
@WiseOwlTutorials
2 жыл бұрын
@@markmiller4659 You're very welcome!
@janellchen6071
2 жыл бұрын
hi there, thank you so much for the knowledge. Is there a way we can replace special characters in the email subject, such as (*/>,
@WiseOwlTutorials
2 жыл бұрын
Hi! You can use the Replace function to do this docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/replace-function I hope it helps!
@jansencosart1765
2 жыл бұрын
how can i just pull the most recent email in folder
@WiseOwlTutorials
2 жыл бұрын
Hi Jansen, the answer here might help www.mrexcel.com/board/threads/get-only-the-latest-email-in-outlook-and-copy-to-excel.1088004/
@mohanmonu8293
3 жыл бұрын
Hello. How can we save attachmnets for specific email only rather than all mails from folder
@WiseOwlTutorials
3 жыл бұрын
Hi Mohan! It depends on how you're identifying the specific email - you could use filters with the Find or Restrict methods to do this as described in videos 29.9 and 29.13 in this playlist kzitem.info/door/PLNIs-AWhQzcleylKSN4MS-tJloReq0XcK I hope that helps!
@TheRenzer9
4 жыл бұрын
Set fol = ns.Folders(1).Folders("Clic Raw") Gives an error "object not found", once the system restarts. Why ?
@TheRenzer9
4 жыл бұрын
Also to bring to your notice that this issue occurs only when I reboot my system and launch outlook again after a system reboot. Also i tried something new. When I rebooted my system this time I knew I would get the error again and so I did as expected..but in order to fix it all I did was to enter '2' in Folders (1) instead of '1'...and it worked...to be sure I restarted my system again with '2' in place this time...and I got the same error...so this time in order to fix it i replaced '2' back with '1' and it worked like a charm again... My new question after this tiny experiment is...why can't we simply set a presidency for the non-default folder once and for all rather than its presidency switching back and forth between 1 and 2...who knows after the next reboot I might have to use '3' 🙄
@markvalenzuela7010
3 жыл бұрын
what if i want to get the folder a from a different mailer account, ? thank you for this tutorials!
@WiseOwlTutorials
3 жыл бұрын
Hi Mark, we have another video which explains how to reference other accounts kzitem.info/news/bejne/252K1656imqHpH4 I hope it helps and thanks for watching!
@markvalenzuela7010
3 жыл бұрын
@@WiseOwlTutorials wow thank you so much!
@WiseOwlTutorials
3 жыл бұрын
@@markvalenzuela7010 No problem!
@travllingisfun6189
3 жыл бұрын
Thanks for sharing. How to download only top 50 mail please suggest..
@WiseOwlTutorials
3 жыл бұрын
Hi there, here's one solution stackoverflow.com/questions/52927919/top-50-emails-from-outlook-from-new-to-old I hope it helps!
@travllingisfun6189
3 жыл бұрын
@@WiseOwlTutorials Thank you very much.
@WiseOwlTutorials
3 жыл бұрын
@@travllingisfun6189 No problem!
@priyankamurugan4951
3 жыл бұрын
I get an error " you dont have appropriate permission to perform this operation" when i try to save the attachment in my local folder. how do i tackle this?
@WiseOwlTutorials
3 жыл бұрын
Hi Priyanka, it seems that this can be caused by a variety of reasons. My suggestion would be to rely on Google (something like "outlook attachment appropriate permission to perform this operation" will do) and work your way through the suggested solutions
@prasenjitmandal5486
3 жыл бұрын
Hi, need your help Can we use macro in shared mail box
@WiseOwlTutorials
3 жыл бұрын
Hi, yes you can docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa220116(v=office.11) I hope it helps!
@gillianmcnosehair9097
3 жыл бұрын
What a cracking set of videos! Thank you so much for this Andrew! I am trying to amend code so it only downloads attachments AFTER 05/09/21 and the file size is over 15KB. When I run the routine the date aspects appears to work but the file cap is ignored. Could someone please help? Is it best to filter via "IF" or restrict method or a combo of both. Thanks so much. Option Explicit Sub SaveOutlookAttachments() Dim olApp As Outlook.Application Dim olNS As Outlook.Namespace Dim olFolder As Outlook.Folder Dim olItem As Object Dim mi As Outlook.MailItem Dim olAtt As Outlook.Attachment Dim filterstring As String Set olApp = New Outlook.Application Set olNS = olApp.GetNamespace("MAPI") Set olFolder = olNS.PickFolder For Each olItem In olFolder.Items If olItem.Class = olMail Then Set mi = olItem If mi.Attachments.Count > 0 And mi.ReceivedTime > "5 / 9 / 2021" And mi.Size > 15000 Then Debug.Print mi.SenderName, mi.ReceivedTime, mi.Attachments.Count, mi.Size For Each olAtt In mi.Attachments olAtt.SaveAsFile "C:\Users\John.Doe\Pictures\OUTLOOKEXPORT\Attachments Export" & Format(mi.ReceivedTime, "yyyy-mm-dd hh-nn-ss ") & olAtt.Filename Next olAtt End If End If Next olItem End Sub
@WiseOwlTutorials
3 жыл бұрын
Hi Gillian, the test for size of the mail item looks fine and should work - it does for me. Bear in mind that the Size property of the mail item represents the full size of the entire email. If you want to check the size of each attachment separately, test the Size property of your olAtt variable in the second loop. I hope it helps!
@gillianmcnosehair9097
3 жыл бұрын
@@WiseOwlTutorials Thanks so much for getting back to me. When I run the routine based on current parameters, I still pick up 5KB PNG files which is wrong. I have tried to add "For Each olAtt In mi.Attachments.Restrict(Filterstring)" But I do not have the intellisense drop-down option in the second loop? I have added Filterstring as a variable, and although it is not included in the earlier code, I would add FilterString = "[size] > 15000 AND [receivedtime] > '05/09/2021'" just above the first "For Each" loop. Would love your help on this.
@WiseOwlTutorials
3 жыл бұрын
@@gillianmcnosehair9097 You can't apply the Restrict method to the object returned by the Attachments property. Just loop through the attachments as you showed in the original code you posted. Add an If statement inside this loop which tests the olAtt.Size property, not the mi.Size property. I hope it helps!
@gillianmcnosehair9097
3 жыл бұрын
@@WiseOwlTutorials Top, Top man. Thanks so much, Andrew. I added the following code: "For Each olAtt In mi.Attachments If olAtt.Size > 10000 And mi.ReceivedTime > "5/09/2021" Then" and it recognised the "IF" and executed perfectly. I've been toiling for an answer for weeks! Just stumbled upon your content and I've acquired a mass of knowledge from your excellent videos. I would like to thank you for making them available.
@WiseOwlTutorials
3 жыл бұрын
@@gillianmcnosehair9097 Excellent! Happy to hear that you got it working, good stuff!
@AliDixon95
5 жыл бұрын
i got an error on the set fol line, i have no idea why?
@WiseOwlTutorials
5 жыл бұрын
Hi Ali, another viewer reported that using ns.Folders(2).Folders("Inbox").Folders("Dell") was required to locate the correct folder for him. You might find this video useful kzitem.info/news/bejne/1YGEv5t8a3N8qGU I hope it helps!
@bobbypetts9432
4 жыл бұрын
I am having an issue when I loop through a folder (for each i in fol.items), only about half of the emails are being picked up by the macro. I've tried setting fol.items to an Outlook.Items object and sorting, but still no good. Do you have any idea what could be happening here?
@akankshagupta9196
3 жыл бұрын
Hi bobby
@alexandrewilson5388
3 жыл бұрын
Hello, I get a runtime error 76, Path not found at line "Set dir = fso.CreateFolder(dirName)". I could retrieve and save the attachments so everything was running fine until I got to the stage of creating folders for the attachments. Any idea what caused the error?
@WiseOwlTutorials
3 жыл бұрын
Hi Alexandre! There are a couple of possible reasons for this. One is that you haven't created all of the necessary parent folders - the CreateFolder method can only create one level at a time. Another possibility is a simple spelling error in the folder path of the value in your dirName variable. I hope that helps!
Пікірлер: 100