Jump to content
water

OutlookEX UDF

Recommended Posts

To display the folder (PST) in a new window use

$aPST[1][1].Display
and to select the folder (PST) to be displayed in the active window use
_OL_FolderSet($oOutlook, $aPST[1][1])


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Oops, sorry. Seems I didn't read the post carefully enough.

Could you replace a line in function _OL_PSTGet and then please run the _OL_PSTGet.au3 example script?

If $sOL_FolderSubString <> "00" Then $sOL_Path &= Chr(Dec($sOL_FolderSubString))
with
If $sOL_FolderSubString <> "00" Then $sOL_Path &= ChrW(Dec($sOL_FolderSubString))

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Another try. Could you please use the following _OL_GetPST function and post the result from the SciTE console when running _OL_PSTGet.au3?

Func _OL_PSTGet($oOL)
 
    Local $sOL_FolderSubString, $sOL_Path, $iIndex1 = 0, $iIndex2, $iOL_Pos, $aOL_PST[1][3] = [[0, 3]]
    Local $oOL_Namespace = $oOL.GetNamespace("MAPI")
    If @error <> 0 Or Not IsObj($oOL_Namespace) Then Return SetError(1, 0, "")
    For $oOL_Folder In $oOL_Namespace.Folders
        $sOL_Path = ""
ConsoleWrite($oOL_Folder.StoreID & @CRLF)
        For $iIndex2 = 1 To StringLen($oOL_Folder.StoreID) Step 2
            $sOL_FolderSubString = StringMid($oOL_Folder.StoreID, $iIndex2, 2)
            If $sOL_FolderSubString <> "00" Then $sOL_Path &= Chr(Dec($sOL_FolderSubString))
        Next
ConsoleWrite($sOL_Path & @CRLF)
        If StringInStr($sOL_Path, "mspst.dll") > 0 Then ; PST file
            $iOL_Pos = StringInStr($sOL_Path, ":\")
            If $iOL_Pos > 0 Then
                $sOL_Path = StringMid($sOL_Path, $iOL_Pos - 1)
            Else
                $iOL_Pos = StringInStr($sOL_Path, "\\")
                If $iOL_Pos > 0 Then $sOL_Path = StringMid($sOL_Path, $iOL_Pos)
            EndIf
            ReDim $aOL_PST[UBound($aOL_PST, 1) + 1][UBound($aOL_PST, 2)]
            $iIndex1 = $iIndex1 + 1
            $aOL_PST[$iIndex1][0] = $oOL_Folder.Name
            $aOL_PST[$iIndex1][1] = $oOL_Namespace.GetFolderFromID($oOL_Folder.EntryID, $oOL_Folder.StoreID)
            $aOL_PST[$iIndex1][2] = $sOL_Path
            $aOL_PST[0][0] = $iIndex1
        EndIf
    Next
    Return $aOL_PST
 
EndFunc   ;==>_OL_PSTGet

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

&gt;&quot;C:\Program Files\AutoIt3\SciTE\..\autoit3.exe&quot; /ErrorStdOut &quot;C:\Program Files\AutoIt3\Examples\_OL_PSTGet.au3&quot;    
0000000038A1BB1005E5101AA1BB08002B2A56C200006D737073742E646C6C00000000004E495441F9BFB80100AA0037D96E0000000043003A005C00550073006500720073005C00730079006D0065006E005C0044006F00630075006D0065006E00740073005C00E705D105E605D90520004F00750074006C006F006F006B005C004F00750074006C006F006F006B002E007000730074000000
8¡»ו¡»+*Vֲmspst.dllNITAש¿¸×7nC:\Users\symen\Documents\חׁז Outlook\Outlook.pst
&gt;Exit code: 0    Time: 5.967

Edited by shai

Share this post


Link to post
Share on other sites

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Program Files\AutoIt3\Examples\_OL_PSTGet.au3"

0000000038A1BB1005E5101AA1BB08002B2A56C200006D737073742E646C6C00000000004E495441F9BFB80100AA0037D96E0000000043003A005C00550073006500720073005C00730079006D0065006E005C0044006F00630075006D0065006E00740073005C00E705D105E605D90520004F00750074006C006F006F006B005C004F00750074006C006F006F006B002E007000730074000000

8¡»ו¡»+*Vֲmspst.dllNITAש¿¸×7nC:\Users\symen\Documents\חׁז Outlook\Outlook.pst

>Exit code: 0 Time: 5.967

Share this post


Link to post
Share on other sites

if you run Outlook 2007 or later this function might return better results. In Col 2 the file path of the PST will be displayed.

#include <OutlookEX.au3>
 
$oOL = _OL_Open()
 
$aStore = _OL_StoreGet($oOL)
_ArrayDisplay($aStore)
_OL_Close($oOL)
 
Func _OL_StoreGet($oOL)
 
    Local $iOL_Index = 0
    Local $aOL_Store[$oOL.Session.Stores.Count + 1][10] = [[$oOL.Session.Stores.Count, 10]]
    For $oOL_Store In $oOL.Session.Stores
        $iOL_Index = $iOL_Index + 1
        $aOL_Store[$iOL_Index][0] = $oOL_Store.DisplayName
        $aOL_Store[$iOL_Index][1] = $oOL_Store.ExchangeStoreType
        $aOL_Store[$iOL_Index][2] = $oOL_Store.FilePath
        $aOL_Store[$iOL_Index][3] = $oOL_Store.IsCachedExchange
        $aOL_Store[$iOL_Index][4] = $oOL_Store.IsDataFileStore
        $aOL_Store[$iOL_Index][5] = $oOL_Store.IsInstantSearchEnabled
        $aOL_Store[$iOL_Index][6] = $oOL_Store.IsOpen
        $aOL_Store[$iOL_Index][7] = $oOL_Store.StoreId
        If $oOL_Store.ExchangeStoreType = $olExchangeMailbox Or $oOL_Store.ExchangeStoreType = $olPrimaryExchangeMailbox Then
            $aOL_Store[$iOL_Index][8] = $oOL_Store.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x661D000B")
        EndIf
    Next
    Return $aOL_Store
 
EndFunc   ;==>_OL_StoreGet
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

That's fine. I will include this function in the next UDF version.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Version 0.6.0 has been released.

Please test before using in production!

For download please see my signature.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

In Outlook you can set "AutoArchiving" (Aging) per folder so that elements older x days get moved to a PST or get deleted.

Is anyone interested in such a feature to be implemented in the OutlookEX UDF?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

In Outlook you can set "AutoArchiving" (Aging) per folder so that elements older x days get moved to a PST or get deleted.

Is anyone interested in such a feature to be implemented in the OutlookEX UDF?

Sounds like a good idea.

Also instead of setting individual "autoarchive" settings per folder it'd be great if it could set the "autoarchive" to use the default settings.

It'd be great to set the "autoarchive" "Default" flag on ALL mail folders.

Thanks!

John Morrison

Share this post


Link to post
Share on other sites

The function will allow to set the autoarchive properties just for a single folder or recursively for all subfolders as well.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

The function will allow to set the autoarchive properties just for a single folder or recursively for all subfolders as well.

That sounds great!

For my situation I have several PST folders to contain various "areas" of interest.

As I understand it....

I could write a script to periodically target the root of each of these and set the Autoarchive on all folders in that file. (to pick up any new ones I've mad since the last run)

Any ODD folders I could then apply individual rules if they are different from teh default.

I'll keep an eye out of the update. :)

Hope you have a great day!

John Morrison

Share this post


Link to post
Share on other sites

Here you can find additional information how AutoArchive works.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hi Storme,

here you find the first test version of the new function.

What do you think?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-11-07 - Version 1.3.0.0) - Download - General Help & Support - Wiki

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

×
×
  • Create New...