![]() ![]() Double click to open the new text file, and then click File > Print to print the exported list of outlook folders. Please click the Yes button or No button as you need.Īnd now a Text file named as Outlook-Folders is created and saved on your desktop as below screenshot shown.ĥ. Then Output Folder Tree dialog box is coming. Next in the opening Select Folder dialog box, please select the email account whose folder list you want to export and print, and click the OK button. I = Len(OLKfolderpath) - Len(Replace(OLKfolderpath, "\", ""))ĬreateFolderTree = OLKprefix & OLKfoldernameģ. Private Function CreateFolderTree(OLKfolderpath, OLKfoldername) ![]() Set objTextFile = objFSO.OpenTextFile(gFileName, 8, True) Set objFSO = CreateObject("Scripting.FileSystemObject") Private Sub WriteToATextFile(OLKfoldername) GetDesktopFolder = objShell.SpecialFolders("Desktop") Set objShell = CreateObject("WScript.Shell") WriteToATextFile (CreateFolderTree(F.FolderPath, F.Name)) GBase = Len(F.FolderPath) - Len(Replace(F.FolderPath, "\", "")) + 1 GFileName = GetDesktopFolder() & "\Outlook-Folders.txt" Result = MsgBox("Do you want to create tree?", vbYesNo + vbDefaultButton2 + vbApplicationModal, "Output Folder Tree") Set objOutlook = CreateObject("Outlook.Application") VBA: Export the list of all Outlook folders and subfolders from Outlook to Notepad Dim gFileName, gCreateTree, gBase This method will introduce a VBA to export the list of all folders and their subfolders in a specified email account from Outlook to Notepad, and then you can print the list of Outlook folders in the Notepad easily. After printing, please close the new email without saving.Įxport and print the list of all Outlook folders ant there subfolders in Notepad Please click File > Print to print the copied list of folders.Ħ. And now the folder list of the specified email account is copied to a new email as below screenshot shown. In the popping out Select Folder dialog box, please select the email account whose list of folders you want to print, and click the OK button. GFolders = gFolders & vbCrLf & sFolderPaths & " " & įor Each oSubFolder In CurrentFolder.FoldersĤ. Sub ProcessFolder(CurrentFolder As Outlook.MAPIFolder)įor i = To 1 Step -1 There is also some useful info at RoboCopy. If you search the forum for it there are lots of threads about it. When I want to copy without changing created date I use the built-in tool RoboCopy. ![]() Set oNewMail = Application.CreateItem(olMailItem) There is a suggestion about exporting the file data you want in How can I print search results from File Explorer about using an app called everything. VBA: Export the list of folders and subfolders in a new email in Outlook Public gFolders As String Click Insert > Module, and then paste below VBA code into the new Module window. Press Alt + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. This method will introduce a VBA to export the list of all folders and their subfolders in a specified email account into a new email in Outlook, and then you can print the list of folders easily.ġ. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |