Jump to content

OutlookEX UDF - Help & Support (II)


water
 Share

Recommended Posts

Hello,

I was wondering if there was a way for OutlookEX to recognize group folders that are not a part of my personal Inbox, but a part of a shared "group" inbox that I and my coworkers access.

I feel the limitation is Outlook itself, as you cannot set up Outlook rules that recognize anything in the group mailbox. I was hoping someone knew of a workaround or a function of OutlookEX that will do what I want.

My goal is to create script that will notify me whenever an email arrives into a specific folder under the Group mailbox.

Using the _OL_FolderTree function reveals every folder under my personal inbox, but does not recognize the Group box (or any of the sub folders) that I am a part of.

 

Thank you.

Link to comment
Share on other sites

_OL_FolderTree works for your group folders as well. You just have to pass the respective starting folder to the function.

Events only work for your personal mailbox.

To check shared folders you could either check for unread mails every x minutes or check for mails that have been received after HH:MM:SS.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Hey water,

I'm having a problem using the function _OL_FolderTree().

When the name of a folder contains a slash "/" or backslash "" character, these characters are translated in the array into "%2F" or "%5C".

For exemple, if a folder named "Input/Output" exists in the mailbox, when you use _OL_FolderTree() on this mailbox, the array line corresponding to this folder will look like this:

mailbox_namefolder_pathInput%2FOutput

Do you know how can I fix this? (i mean another way rather than analysing every array rows for %2F and %5C and remplacing them by "/" and "").

Thanks in advance for your help :)

Edited by Neutro
Link to comment
Share on other sites

If you select one of this folders in outlook and then right click to check the properties you'll find the path to the folder. Do you see the encoded path there?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Link to comment
Share on other sites

OK I understand what you meant :)

I tried with a subfolder and get this:

30svkuw.jpg

30svkuw.png

So the problem is coming from Outlook itself!?! Damn you Microsoft! :laser:

Well i guess the only solution to this is to look for %2F and %5C in the array and replace them so I can use the array after with _OL_FolderAccess and _OL_FolderCopy().

Edited by Neutro
Link to comment
Share on other sites

If you have a backslash in the foldername how would you distinguish it from the backslash used to separate parent and child folders?

I would drop using slash and backslash and use only those characters allowed when creating a windows filename.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

My goal is to copy the folder with "/" and "" in their names in a pst file using _OL_FolderAccess and _OL_FolderCopy.

So if using the full folder path with "/" and "" does not work with these function, I guess I need to rename the folders before copying them.

Thanks again water :)

Link to comment
Share on other sites

Shouldn't be a problem if you pass the source and target folder in encoded form.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

So i made some test with my "Input/Output folder":

_OL_FolderAccess($outlook, "mailbox_namefolder_pathinput%2FOutput") returns "" and set @error to 1

_OL_FolderAccess($outlook, "mailbox_namefolder_pathinput/Output") works

 

Then i tested with "InputOutput" folder:

_OL_FolderAccess($outlook, "mailbox_namefolder_pathInput%5COutput") returns "" and set @error to 1

_OL_FolderAccess($outlook, "mailbox_namefolder_pathInputOutput") returns "" and set @error to 1

So either way I cannot access the folders if a "" is used :(

PS: the script i'm doing is made to backup PST files of users that sometimes have "/" or "" in their folder names.

 

#edit : well i figured a way out :)

I was doing a loop of every folder and every sub folder and copied them using _OL_Folder_Copy because I didn't notice it would copy even subfolders directly  :doh:

So now i just use _OL_Folder_Copy on first subfolder levels and it will copy subfolders inside even if their names contain "" or "/" :sorcerer:

Edited by Neutro
Link to comment
Share on other sites

Glad to hear that you could solve the problem :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

hello,

situation:

Outlook 2010 configured for Gmail as IMAP + some local PST's.

_OL_PSTGet() returns only the local PST's, and not the Gmail store.

looking at _OL_PSTGet()  [line 4436] i see:

If StringInStr($sPath, "mspst.dll") > 0 Then

 for the Gmail store, the string contains "pstprx.dll" rather than "mspst.dll".

if i change the line to:

If StringInStr($sPath, "mspst.dll") > 0 Or StringInStr($sPath, "pstprx.dll") > 0 Then

then the Gmail store is returned too.

water, is there a reason for excluding pstprx.dll from the stores? i.e. is pstprx used for some non-PST identification? or is it just an overlook?

(note: not yet tested on Outlook XP or 2003)

PS, water, you should really open a dedicated forum for OutlookEx, rather than a chain of threads. i believe it would be easier to search and organize topics, and you definitely deserve it.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

_OL_PSTGet is created to return all PSTs created by you. It is made to run with "older" Outlook versions (<2007).

Could you please give _OL_StoreGet a try? That's the newer version made for Outlook 2007 and later.

A dedicated OutlookEX forum isn't possible - they are created by the Mods. And I don't think it is sensible. We have 3 threads now: One to discuss current functionality and enhancements, one support thread (split into two because the first got too long) and a third for examples.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

i went to _OL_PSTGet because i am going to use it on Outlook 2003 (and most probably Outlook XP too), so _OL_StoreGet is not an option. i did try it though (Outlook 2010), and it did return the Gmail store, but the file path returned empty string. 

 

i will keep the modified function for further tests on Outlook XP/2003, and for Exchange store.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

I don't think it is sensible to directly access the PST file of the GMail mailbox. What for do you need this information?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Google tells me that pstprx.dll is used to synchronize the PST file with your GMail account.

mspst.dll is the Personal Folder/Address Book Service Provider.

Should I enhance _OL_PSTGet so it returns all PST files? Or is a note that _OL_PSTGet only lists PSTs created by the user enough?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

enhance _OL_PSTGet? your call, but i think it is expected that if a store is visually listed in Outlook, it should be returned by the function. you can add an optional parameter to the function, something like this:

Func _OL_PSTGet($oOL,$bLocalOnly=True)

and the condition would then be:

If StringInStr($sPath, "mspst.dll") > 0 Or (Not $bLocalOnly And (StringInStr($sPath, "pstprx.dll") > 0)) Then

this, i imagine, requires some testing in several environments, to validate it does not return unexpected results. as i said, i will test in Outlook XP/2003 and with Exchange.

what do i need it for? i'm not going to manipulate any of the stores, but i am comparing the results returned from Outlook via COM to the data as stored in the registry. as for why i'm doing that, i will share in details when my code is working, but for now trust me on this, i do have a good enough reason (for me at least).

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

As _OL_StoreGet returns the GMail pst I think it is sensible to add the feature to _OL_PSTGet too.

If your tests run successfully I will be happy to add your code to the function.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

water, would you like the function _OL_ProfileGetCurrent($oOL) ?

on Outlook 2007 and higher, this is a one-line call to a NameSpace.CurrentProfileName property, but for 2003 and earlier... well, the entire web says it can't be done (unless using 3rd-party add-ins, or CDO which is an additional installation).

forgive me bragging, but your humble servant have got it working for Outlook XP all the way to 2013.

while at it, i made some more slight improvements on my version of _OL_PSTGet(), and i confirm it works on Outlook XP all the way to 2013. also, i found that pstprx.dll is used for Exchange (native and ActiveSync), also tested.

if there's any interest, i'll publish the stuff here. warning: it's definitely NOT a one-liner... ;) 

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

orbs,

if your code is useful for you (and I got the impression it is), then I'm sure it can be useful for others too.

I will be glad to add your functions to the UDF.

Post the code here or send me a PM and I will have a look at it.

Thanks for taking the time to enhance the UDF!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...