hiskrot.blogg.se

Windows 10 directory list and print
Windows 10 directory list and print







windows 10 directory list and print
  1. #WINDOWS 10 DIRECTORY LIST AND PRINT FULL#
  2. #WINDOWS 10 DIRECTORY LIST AND PRINT CODE#
  3. #WINDOWS 10 DIRECTORY LIST AND PRINT WINDOWS#

Open the VBA Editor by pressing Alt+F11 on your keyboard.JD Design ExpPrint - Directory Listing Utility for WindowsĮxpPrint The Flexible File/Directory Listing Utilityĭownload Purchase ExpPrint Documentation FAQs Our Products Home VideosĮxpPrint is a file/directory listing program that integrates with Windows File Explorer. The macros on this page should be placed in a module. In Outlook 2007 and older, look at Tools, Macro Security.Īfter you test the macro and see that it works, you can either leave macro security set to low or sign the macro. To check your macro security in Outlook 2010 and newer, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. You can sign the macro when it is finished and change the macro security to notify. You could choose the option Notification for all macros, then accept it each time you restart Outlook, however, because it's somewhat hard to sneak macros into Outlook (unlike in Word and Excel), allowing all macros is safe, especially during the testing phase. The macros will not work with the top two options that disable all macros or unsigned macros. StrFolders = strFolders & vbCrLf & olTempFolderPath & vbTab & olcount & vbTab & kbSizeįirst: You need to have macro security set to the lowest setting, Enable all macros during testing. 'prints the folder path, name, and size in the VB Editor's Immediate windowĭebug.Print olTempFolderPath, olcount, kbSize ' reset folder size so you don't have a running totalĭebug.Print olcount, objItem.Subject, objItem.Size It will take longer to run the macro using this version of the ProcessFolder macro.

windows 10 directory list and print

The printout will look like 151 34534 Mailer 361 44KB To use this macro, replace the ProcessFolder macro above with this one. If you want to include the folder size, you need to get the size of each item in the folder and add them together. 'Don't need to process the Deleted Items folder ' Loop through and search each subfolder of the current folder.įor Each olNewFolder In CurrentFolder.Folders StrFolders = strFolders & vbCrLf & olTempFolderPath & vbTab & olCount ' use olTempFolder if you want foldernames only 'prints the folder path and name in the VB Editor's Immediate windowĭebug.Print olTempFolderPath & " " & olCount OlTempFolderPath = olTempFolder.FolderPath Set olTempFolder = CurrentFolder.Folders(i) ' Loop through the items in the current folder.įor i = To 1 Step -1 Sub ProcessFolder(CurrentFolder As Outlook.MAPIFolder) ' clear the string so you can run it on another folder Set Fileout = fso.CreateTextFile(strPath, True, False) Set fso = CreateObject("Scripting.FileSystemObject") StrPath = Environ("USERPROFILE") & "\Documents\OutlookFolders.csv" ' To create a text file you can open in Excel, use this

windows 10 directory list and print

Set ListFolders = Application.CreateItem(olMailItem) ' Create a new mail message with the folder list inserted ' Check to make sure user didn't cancel PickFolder dialog. ' Allow the user to pick the folder in which to start the search. Set olSession = olApp.GetNamespace("MAPI") If you want to list all folders in your data file, choose the top of the data file, which is usually your email address. When you run the macro, the folder picker dialog will come up for you to pick the data file (or subfolder) to use as the top level folder for the printout.

#WINDOWS 10 DIRECTORY LIST AND PRINT CODE#

Paste the following code into the module then run the macro. Right-click on Project1 and Insert > Module. To use, open the VB Editor by pressing Alt+F11. Macro to print a list of folders in an Outlook data file Updated Mato include the item count after the folder name, like this:

#WINDOWS 10 DIRECTORY LIST AND PRINT FULL#

While I don't have subfolders in the data file I printed out, the printout will include any subfolders and list the full path. The folder list will be in the following format.

windows 10 directory list and print

StrFolders = strFolders & vbCrLf & olTempFolder









Windows 10 directory list and print