Gowrisankar Posted November 22, 2018 Posted November 22, 2018 Dear members of the forum, I'm working on a project where incoming emails are to be analyzed based on the subject line and moved to various folders in a shared mailbox. I'm using "OutlookEx.au3" of @water. The macro can can move emails to any folder that I newly create. But the macro couldn't move emails to specific folders that are already existing. I checked the permission levels of those folders and found that nothing is wrong with that. The function I use is _OL_ItemMove. Please guide me how to proceed further. Thanks in advance. -Gowrisankar.
water Posted November 22, 2018 Posted November 22, 2018 The value of @error and @extended after _OL_ItemMove should shed some light onto the subject. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 22, 2018 Author Posted November 22, 2018 2 minutes ago, water said: The value of @error and @extended after _OL_ItemMove should shed some light onto the subject. @error is 1 and @extended is 4
water Posted November 22, 2018 Posted November 22, 2018 @error 4 stands for: Specified folder could not be found. Can you please post the _OL_ItemMove statement you run? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 22, 2018 Author Posted November 22, 2018 (edited) 16 minutes ago, water said: @error 4 stands for: Specified folder could not be found. Can you please post the _OL_ItemMove statement you run? _OL_ItemMove($oOutlook, $sEntryId1, Default, $sDestinationFolder) (Example : $sDestinationFolder = "abc.xyz@abc.com\Inbox\Central") The folder is present in mailbox and I've even checked the spellings, extra punctuation, spaces etc., and everything is correct. Edited November 22, 2018 by Gowrisankar
Moderators Melba23 Posted November 22, 2018 Moderators Posted November 22, 2018 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
water Posted November 22, 2018 Posted November 22, 2018 Can you please test to access the Folder using _OL_FolderAccess? @error and @extended will then give better error Information. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 22, 2018 Author Posted November 22, 2018 3 hours ago, Melba23 said: Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Moderation Team My sincere apologies @Melba23.
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 (edited) On 11/22/2018 at 5:06 PM, water said: Can you please test to access the Folder using _OL_FolderAccess? @error and @extended will then give better error Information. @water, I tried _OL_FolderAccess and got the following. @error = 4 ; @extended = 3 As in the example, "abc.xyz@abc.com\Inbox\Central" the @extended denotes that error is in accessing the folder "Central". Edited November 27, 2018 by Gowrisankar
water Posted November 27, 2018 Posted November 27, 2018 Can you please post the full line where you call _OL_FolderAccess (means: Do you set parameters $iFolderType or $iItemType?). My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 3 minutes ago, water said: Can you please post the full line where you call _OL_FolderAccess (means: Do you set parameters $iFolderType or $iItemType?). @water, I dont' call _OL_FolderAccess. I use item move statement as below. _OL_ItemMove($oOutlook, $sEntryId1, Default, $sDestinationFolder) I presume _OL_FolderAccess is called from _OL_ItemMove.
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 (edited) This is the code I use for Folder access... please ignore the previous response. I mistook it. Global $aFolder = _OL_FolderAccess($oOutlook, "abc.xyz@abc.com\Inbox\Central") Global $aFolderDisplay[6][2] = [[$aFolder[0]],["","Folder object"],["","Default item type for the folder"],["", "StoreID where the folder resides"],["", "EntryID of the folder"],["", "Folder path"]] $aFolderDisplay[1][0] = $aFolder[1] $aFolderDisplay[2][0] = $aFolder[2] $aFolderDisplay[3][0] = $aFolder[3] $aFolderDisplay[4][0] = $aFolder[4] $aFolderDisplay[5][0] = $aFolder[5] _ArrayDisplay($aFolderDisplay, "Folder successfully accessed.") Edited November 27, 2018 by Gowrisankar
water Posted November 27, 2018 Posted November 27, 2018 OK, let's strip it down as far as possible: Global $aFolder = _OL_FolderAccess($oOutlook, "abc.xyz@abc.com\Inbox") ConsoleWrite("Inbox: @error = " & @error & ", @extended = " & @extended & @CRLF) Global $aFolder = _OL_FolderAccess($oOutlook, "abc.xyz@abc.com\Inbox\Central") ConsoleWrite("Inbox\Central: @error = " & @error & ", @extended = " & @extended & @CRLF) Please post the output of the SciTE console pane. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 21 minutes ago, water said: OK, let's strip it down as far as possible: Global $aFolder = _OL_FolderAccess($oOutlook, "abc.xyz@abc.com\Inbox") ConsoleWrite("Inbox: @error = " & @error & ", @extended = " & @extended & @CRLF) Global $aFolder = _OL_FolderAccess($oOutlook, "abc.xyz@abc.com\Inbox\Central") ConsoleWrite("Inbox\Central: @error = " & @error & ", @extended = " & @extended & @CRLF) Please post the output of the SciTE console pane. I'll get back to you after 3-4 hours @water. Thanks for your support.
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 @water, I'm able to access "abc.xyz@abc.com\Inbox". Array with folder details are populated. When I tried to access ""abc.xyz@abc.com\Inbox\Central", the following error was popped up. "Inbox: @error = 4, @extended = 3"
water Posted November 27, 2018 Posted November 27, 2018 Do you run your script or mine? My script does not show a "pop up". If you run my script then the message you posted tells us that accessing the Inbox does not work. Because when there is a problem with "Central" the message would tell "Inbox\Central" not just "Inbox". Please run my 4-line-script and post the exact output (all lines) you get from SciTE. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 @water, the problem is within a client machine and they don't have AutoIt installed. So I shared 2 exe files one for "Inbox" and one for "Inbox\Central" with array display for positive results and message box with @error and @extended for negative results. That is how I got the result as @error = 4, @extended = 3
water Posted November 27, 2018 Posted November 27, 2018 Does the client machine have a different language setup? I have a german setup and hence my directory structure would be named "abc.xyz@abc.com\Posteingang\Central" My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Gowrisankar Posted November 27, 2018 Author Posted November 27, 2018 No such different language. They use English only. I have seen it many times.
water Posted November 27, 2018 Posted November 27, 2018 Can you try to access the Inbox\Central folder on your machine? If it works we know it is related to a single/few computers. If it doesn't work at all we know it is a global problem. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now