![]() You should keep calm to consider measures, such as thinking over whether you have updated backup and consider how to repair PST – whether to resort to third party tool like DataNumen Outlook Repair or contact relevant professionals. As we all know, panic is helpless and even leading to more chaotic and serious problems. Yet, in reality, you’d better calm down as soon as possible. You may tend to be worried when encountering PST damage. At once, an Excel file will show up, which contains the counts of sent emails in every month, as shown in the figure below.ĭon’t Panic in Face of Outlook Corruption. ![]() Subsequently, press “F5” to trigger this macro.Next, move cursor into the first subroutine.ObjDictionary(strMonth) = objDictionary(strMonth) + 1 StrMonth = Format(Year(objMail.SentOn) & "-" & Month(objMail.SentOn), "YYYY/MM") If objCurFolder.Items(i).Class = olMail Then Sub ProcessFolders(ByVal objCurFolder As Outlook.Folder)įor i = To 1 Step -1 NLastRow = objExcelWorksheet.Range("A" & ).End(xlUp).Row + 1 Set objExcelWorksheet = objExcelWorkbook.Sheets(1)įor i = LBound(varMonths) To UBound(varMonths) Set objExcelApp = CreateObject("Excel.Application") If objFolder.DefaultItemType = olMailItem Then Set objOutlookFile = (olFolderInbox).Parentįor Each objFolder In objOutlookFile.Folders Set objDictionary = CreateObject("Scripting.Dictionary") After that, put the following VBA code into a project or module. ![]() Then, enable reference to “MS Excel Object Library” according to “ How to Add an Object Library Reference in VBA“. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |