Skip to main content

Conas liosta de na fillteáin agus na fofhillteáin uile in Outlook a easpórtáil agus a phriontáil?

Go ginearálta, is féidir leat brú Ctrl + 6 eochracha chun liosta na bhfillteán uile ar an bPána Nascleanúna in Outlook a fheiceáil. Mar sin féin, ní féidir leat liosta na bhfillteán a phriontáil. Tabharfaidh an t-alt seo dhá scripte VBA isteach chun liosta na bhfillteán uile agus a bhfofhillteáin in Outlook a easpórtáil agus a phriontáil.


Easpórtáil agus priontáil liosta na bhfillteán Outlook go léir agus a bhfofhillteáin i ríomhphost nua

Tabharfaidh an modh seo VBA isteach chun liosta na bhfillteán uile agus a bhfofhillteáin i gcuntas ríomhphoist sonraithe a easpórtáil i ríomhphost nua in Outlook, agus ansin is féidir leat liosta na bhfillteán a phriontáil go héasca.

1. Brúigh Eile + F11 eochracha chun an fhuinneog Microsoft Visual Basic for Applications a oscailt.

2. cliceáil Ionsáigh > Modúil, agus ansin greamaigh faoi bhun chód VBA isteach i bhfuinneog nua an Mhodúil.

VBA: Easpórtáil liosta na bhfillteán agus na bhfofhillteán i ríomhphost nua in Outlook

Public gFolders As String

Public Sub GetFolderNames()
Dim oSession As Outlook.NameSpace
Dim oFolder As Outlook.MAPIFolder
Dim oNewMail As Outlook.mailItem

Set oSession = Outlook.Application.GetNamespace("MAPI")
Set oFolder = oSession.PickFolder

If (oFolder Is Nothing) Then Exit Sub

ProcessFolder oFolder

Set oNewMail = Application.CreateItem(olMailItem)
oNewMail.Body = gFolders
oNewMail.Display

gFolders = ""
End Sub

Sub ProcessFolder(CurrentFolder As Outlook.MAPIFolder)

Dim i As Long
Dim oSubFolder As Outlook.MAPIFolder
Dim oFolder As Outlook.MAPIFolder
Dim sFolderPaths As String

    For i = CurrentFolder.Folders.Count To 1 Step -1
Set oFolder = CurrentFolder.Folders(i)

sFolderPaths = oFolder.FolderPath
gFolders = gFolders & vbCrLf & sFolderPaths & " " & oFolder.Items.Count
Next

For Each oSubFolder In CurrentFolder.Folders
If oSubFolder.Name <> "Deleted Items" Then
ProcessFolder oSubFolder
End If

Next

End Sub

3. Brúigh F5 eochair chun an VBA seo a rith.

4. Sa bhosca dialóige Roghnaigh Fillteán, roghnaigh an cuntas ríomhphoist ar mian leat a liosta fillteán a phriontáil, agus cliceáil ar an OK cnaipe. Féach an pictiúr:

5. Agus anois cóipeáiltear liosta fillteán an chuntais shonraithe ríomhphoist chuig r-phost nua mar atá thíos an pictiúr a thaispeántar. Cliceáil le do thoil Comhad > Print chun liosta cóipeáilte na bhfillteán a phriontáil.

6. Tar éis é a phriontáil, dún an ríomhphost nua gan sábháil.


Easpórtáil agus priontáil liosta na bhfo-fhillteán uile de na fillteáin Outlook i Notepad

Tabharfaidh an modh seo VBA isteach chun liosta na bhfillteán uile agus a bhfofhillteáin a easpórtáil i gcuntas ríomhphoist sonraithe ó Outlook go Notepad, agus ansin is féidir leat liosta na bhfillteán Outlook sa Notepad a phriontáil go héasca.

1. Brúigh Eile + F11 eochracha chun an fhuinneog Microsoft Visual Basic for Applications a oscailt.

2. cliceáil Ionsáigh > Modúil, agus ansin greamaigh faoi bhun chód VBA isteach i bhfuinneog nua an Mhodúil.

VBA: Easpórtáil liosta na bhfillteán agus na bhfofhillteán Outlook go léir ó Outlook go Notepad

Dim gFileName, gCreateTree, gBase

Public Sub ExportFolderTree()
Dim objOutlook
Dim F, Folders
Dim Result

  Set objOutlook = CreateObject("Outlook.Application")

  Set F = objOutlook.Session.PickFolder

If Not F Is Nothing Then
Set Folders = F.Folders

    Result = MsgBox("Do you want to create tree?", vbYesNo + vbDefaultButton2 + vbApplicationModal, "Output Folder Tree")
If Result = 6 Then
gCreateTree = True
Else
gCreateTree = False
End If

    gFileName = GetDesktopFolder() & "\Outlook-Folders.txt"
gBase = Len(F.FolderPath) - Len(Replace(F.FolderPath, "\", "")) + 1

    WriteToATextFile (CreateFolderTree(F.FolderPath, F.Name))

LoopFolders Folders

Set F = Nothing
Set Folders = Nothing
Set objOutlook = Nothing
End If
End Sub

Private Function GetDesktopFolder()
Dim objShell
Set objShell = CreateObject("WScript.Shell")
GetDesktopFolder = objShell.SpecialFolders("Desktop")
Set objShell = Nothing
End Function

Private Sub LoopFolders(Folders)
Dim F

For Each F In Folders
WriteToATextFile (CreateFolderTree(F.FolderPath, F.Name))
LoopFolders F.Folders
Next
End Sub

Private Sub WriteToATextFile(OLKfoldername)
Dim objFSO, objTextFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(gFileName, 8, True)
objTextFile.WriteLine (OLKfoldername)
objTextFile.Close
Set objFSO = Nothing
Set objTextFile = Nothing
End Sub

Private Function CreateFolderTree(OLKfolderpath, OLKfoldername)
If gCreateTree = False Then
CreateFolderTree = Mid(OLKfolderpath, 3)
Else
Dim i, x, OLKprefix
i = Len(OLKfolderpath) - Len(Replace(OLKfolderpath, "\", ""))

    For x = gBase To i
OLKprefix = OLKprefix & "-"
Next

CreateFolderTree = OLKprefix & OLKfoldername
End If
End Function

3. Brúigh F5 eochair chun an VBA seo a rith. Ar Aghaidh sa bhosca dialóige Roghnaigh Fillteán, roghnaigh an cuntas ríomhphoist ar mian leat a liosta fillteán a easpórtáil agus a phriontáil, agus cliceáil ar an OK cnaipe. Féach an pictiúr:

4. Ansin tá bosca dialóige Crann Fillteán Aschuir ag teacht. Cliceáil le do thoil ar an Is ea cnaipe nó Uimh cnaipe mar is gá duit.

Agus anois comhad Téacs darb ainm Fillteáin Outlook a chruthú agus a shábháil ar do dheasc mar a thaispeántar thíos an scáileán.

5. Cliceáil faoi dhó chun an comhad téacs nua a oscailt, agus ansin cliceáil Comhad > Print chun liosta na bhfillteán dearcadh a onnmhairítear a phriontáil.

Cliceáil amháin chun líon iomlán na n-ítimí a thaispeáint i ngach fillteán ar an bPána Nascleanúna in Outlook

De ghnáth, taispeánann Outlook líon na n-ítimí neamhléite i ngach fillteán ar an bPána Nascleanúna. Ach, Kutools for Outlook's Taispeánann gach Fillteán Líon Iomlán na Míreanna is féidir le gné cabhrú leat líon iomlán na n-ítimí a thaispeáint i ngach fillteán gan ach cliceáil amháin a dhéanamh.


taispeánann gach fillteán an líon iomlán kto 9.00

Airteagail gaolmhara


Uirlisí Táirgiúlachta Oifige is Fearr

Kutools le haghaidh Outlook - Níos mó ná 100 Gnéithe cumhachtacha chun do Outlook a shárú

🤖 Cúntóir Ríomhphoist AI: Ríomhphoist pro toirt le draíocht AI - aon-cliceáil chun freagraí genius, ton foirfe, máistreacht ilteangach. Trasfhoirmigh ríomhphost gan stró! ...

📧 Uathoibriú Ríomhphoist: As Oifig (Ar fáil do POP agus IMAP)  /  Sceideal Seol Ríomhphoist  /  Auto CC/BCC de réir Rialacha Agus Ríomhphost á Sheoladh  /  Auto Ar Aghaidh (Ardrialacha)   /  Beannacht Auto Cuir leis   /  Scoilt Ríomhphoist Ilfhaighteoirí go huathoibríoch i dTeachtaireachtaí Aonair ...

📨 Bainistíocht Ríomhphost: Ríomhphoist a Athghairm go héasca  /  Bloc Ríomhphoist Scam ag Ábhair agus Daoine Eile  /  Scrios Ríomhphoist Dúblacha  /  Cuardach Casta  /  Comhdhlúthaigh Fillteáin ...

📁 Ceangaltáin ProSábháil Baisc  /  Baisc Dícheangail  /  Comhbhrú Baisc  /  Auto Sábháil   /  Auto Dícheangail  /  Comhbhrúite Auto ...

🌟 Draíocht Chomhéadain: 😊Níos mó Emojis Pretty and Cool   /  Treisiú Do Tháirgiúlacht Outlook le Radhairc Tabbed  /  Íoslaghdaigh Outlook In ionad Deiridh ...

???? Wonders aon-cliceáil: Freagair Gach Duine le Ceangaltáin Isteach  /   Ríomhphoist Frith-Iascaireachta  /  🕘 Taispeáin Crios Ama an tSeoltóra ...

👩🏼‍🤝‍👩🏻 Teagmhálaithe & Féilire: Baisc Cuir Teagmhálacha Ó Ríomhphoist Roghnaithe  /  Roinn Grúpa Teagmhála ar Ghrúpaí Aonair  /  Bain Meabhrúcháin Breithlá ...

Thar Gnéithe 100 Fan le do Thaiscéalaíocht! Cliceáil Anseo le Tuilleadh Amach.

 

 

Comments (3)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Thank you so much for this very valuable post. It really helped me a lot as outlook is still not able to show the folder structure!
This comment was minimized by the moderator on the site
Saved us a ton of time. Thanks for the detailed instructions. Worked like a charm! :)
Rated 5 out of 5
This comment was minimized by the moderator on the site
Most excellent tip. Thank you!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations