Jump to content
Sign in to follow this  
HighlanderSword

_OL_FolderTree

Recommended Posts

Hello Water,

 

When using _ol_folderTree it returns folders that are not visible in outlook Mail.

A few examples are

Conversation Action Settings1
Conversation Action Settings2
Conversation Action Settings3
News Feed 1
Quick Step Settings1
Quick Step Settings2
Quick Step Settings3

I'm guessing those are not Mail folders but other types of folders.

I need to be able to present to the users a list of Mail folders only any ideas ?

Below is the code I'm using

 

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
Global $aPST = _OL_PSTGet($oOutlook)
$aResult = _OL_FolderTree($oOutlook, $aPST[1][0])

 

Share this post


Link to post
Share on other sites

Will check when I return to my office :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

When you run the following script, is there a difference between wanted and unwanted folders in Col1 to Col 3?

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
Global $aPST = _OL_PSTGet($oOutlook)
$aResult = _OL_FolderTreeEX($oOutlook, $aPST[1][0])
_ArrayDisplay($aResult)

Func _OL_FolderTreeEX($oOL, $vFolder, $iLevel = 9999)

    If $iLevel = Default Then $iLevel = 9999
    Local $aTemp, $aFolderTree[1][4]
    If Not IsObj($vFolder) Then
        If StringStripWS($vFolder, 3) = "" Then Return SetError(1, 0, "")
        $aTemp = _OL_FolderAccess($oOL, $vFolder)
        If @error Then Return SetError(2, @error, "")
        $vFolder = $aTemp[1]
    EndIf
    $aFolderTree[0][0] = $vFolder.FolderPath
    $aFolderTree[0][1] = $vFolder.Class
    $aFolderTree[0][2] = $vFolder.DefaultIType
    $aFolderTree[0][3] = $vFolder.DefaultMessageClass
    $iLevel = $iLevel - 1
    If $iLevel > 0 Then
        For $oFolder In $vFolder.Folders
            $aTemp = _OL_FolderTreeEX($oOL, $oFolder, $iLevel)
            If @error Then Return SetError(2, @error, "")
            _ArrayConcatenate($aFolderTree, $aTemp)
        Next
    EndIf
    Return $aFolderTree

EndFunc   ;==>_OL_FolderTreeEX

 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

Hello,

 

No it doesn't resolve it , the examples are below.

Valid Email folders also show as IPM.NOTE an example is

Inbox 2   IPM.Note

 

Below are the items that are not folders

 

Conversation Action Settings1 2   IPM.Note
Conversation Action Settings2 2   IPM.Note
Conversation Action Settings3 2   IPM.Note
News Feed 1 2   IPM.Note
Quick Step Settings1 2   IPM.Note
Quick Step Settings2 2   IPM.Note
Quick Step Settings3 2   IPM.Note

Share this post


Link to post
Share on other sites

This seem to be hidden folders. But at the moment I don't know how to query this attribute so this folders can be suppressed.

I'm sure I have already asked - but I'm doing it again: Which vesion of Outlook do you run?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

I have been searching the web high and low but haven't yet  found a way to ignore hidden folders :(


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...