HighlanderSword

_OL_FolderTree

8 posts in this topic

#1 ·  Posted

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



#2 ·  Posted

Will check when I return to my office :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

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

#5 ·  Posted

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#6 ·  Posted

Yip that's what I just found as well, I tried deleting then in MFCMAPI and they just come right back

 

I'm using Outlook 2013

Share this post


Link to post
Share on other sites

#7 ·  Posted

Hello Water,

 

Any luck with the Hidden Folders ?

Share this post


Link to post
Share on other sites

#8 ·  Posted

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - 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