![]() ![]() 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 Set oNewMail = Application.CreateItem(olMailItem) VBA: Export the list of folders and subfolders in a new email in Outlook Public gFolders As String EXPORT LIST OF FILES IN FOLDER AND SUBFOLDERS CODEClick 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. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |