dazzy999 Posted January 20, 2012 Posted January 20, 2012 Hi, Is it possible to automate the following in outlook : 1) Create a new contacts folder e.g 'GAL' 2) Import a contacts pst from Import/Export wizard and import it into the 'GAL' 3) In Address Book Options, change the address list order to make it goto the top, also set the 'GAL' to show as the first list Thanks
water Posted January 20, 2012 Posted January 20, 2012 If you use Outlook 2007 or later you can try my OutlooKEX UDF. 1) Yes 2) Yes 3) Not at the moment. But shouldn't be that hard Just a quick and short reply. If you need more information - just post. 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
dazzy999 Posted January 20, 2012 Author Posted January 20, 2012 If you use Outlook 2007 or later you can try my OutlooKEX UDF.1) Yes2) Yes3) Not at the moment. But shouldn't be that hardJust a quick and short reply. If you need more information - just post.Thanks for your reply.So how would this be done ? Is it through pure scripting or by simulating keyboard and mouse ?
water Posted January 20, 2012 Posted January 20, 2012 (edited) It's pure scripting. The OutlookEX UDF access Outlook using COM. You would do something like: _OL_Open() ; Open connection to Outlook _OL_FolderCreate() ; Create the new folder _OL_FolderAccess() ; Access your PST _OL_ItemCopy ; Copy the required items in a loop _OL_Close() ; Close the Outlook connection Edited January 21, 2012 by water 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
dazzy999 Posted January 20, 2012 Author Posted January 20, 2012 It's pure scripting. The OutlookEX UDF access Outlook using COM. You would do something like: _OL_Open() ; Open connection to Outlook _OL_FolderCreate() ; Create the new folder _OL_FolderAccess() ; Access your PST _OL_ItemCopy ; Copy the required items in a loop _OL_Close() ; Close the Outlook connection Thanks. So regarding the third part, can you please terll me how can that be achieved ? When you said 'Not at the moment' I presume your OutlooKEX UDF doesnt have the funtion for it. So would that be done via recording keystrokes and mouse movements or can that be scripted too.
water Posted January 20, 2012 Posted January 20, 2012 Regarding part 3:This will be a bit harder because "The ResolutionOrder property is read-only. You cannot change the resolution order of an address list through the Outlook object model." according to MSDN (this seems to be true for Outlook 2007 and 2010).So another solution needs to be found (Registry, GUI automation ...). Need to think about that. 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
dazzy999 Posted January 20, 2012 Author Posted January 20, 2012 Regarding part 3:This will be a bit harder because "The ResolutionOrder property is read-only. You cannot change the resolution order of an address list through the Outlook object model." according to MSDN (this seems to be true for Outlook 2007 and 2010).So another solution needs to be found (Registry, GUI automation ...). Need to think about that.Thank you very much for your help. If you get the time and you are able to figure this out it would really be great.
water Posted January 20, 2012 Posted January 20, 2012 Why do you want to change the order of address resolution? 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
dazzy999 Posted January 20, 2012 Author Posted January 20, 2012 Why do you want to change the order of address resolution?It is a requirement for a project i am working on.
water Posted January 21, 2012 Posted January 21, 2012 (edited) I think we should start with 1) and 2). Do you need any assistance? _OL_Open() ; Open connection to Outlook _OL_FolderCreate() ; Create the new folder _OL_FolderAccess() ; Access your PST _OL_ItemCopy ; Copy the required items in a loop _OL_Close() ; Close the Outlook connection Edited January 21, 2012 by water 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
dazzy999 Posted January 23, 2012 Author Posted January 23, 2012 At the moment we wanted to see if this tool could achieve what we are trying to do. Also we have to get this tool authorised for use, only then we shall be able to use and test it. So if and when we do it I shall ask for your help. I really appreciate your help I think we should start with 1) and 2). Do you need any assistance? _OL_Open() ; Open connection to Outlook _OL_FolderCreate() ; Create the new folder _OL_FolderAccess() ; Access your PST _OL_ItemCopy ; Copy the required items in a loop _OL_Close() ; Close the Outlook connection
water Posted January 23, 2012 Posted January 23, 2012 Glad to be of service. If you need a quick and dirty test script just let me know. 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
dazzy999 Posted January 25, 2012 Author Posted January 25, 2012 Glad to be of service. If you need a quick and dirty test script just let me know.Will do thanks
BullDog Posted March 2, 2012 Posted March 2, 2012 Just wondered if that offer of a quick and dirty demo script was still open?I need to export a .pst inbox to a .csv file so that information can be extracted and used in a different program.I would be very grateful
water Posted March 2, 2012 Posted March 2, 2012 (edited) I'm not in my office at the moment so I can't test. But a script should like this: #include <outlookEX.au3> Global $oOutlook = _OL_Open() ; Access PST $oFolder = _OL_PSTAccess($oOutlook, "C:tempTest.pst") If @error <> 0 Then Exit MsgBox(16, "OutlookEX Example Script", "Error accessing 'C:tempTest.pst' archive. @error = " & @error & ", @extended: " & @extended) ; Find mail items in the folder and all subfolders $aItems = _OL_ItemFind($oOutlook, $oFolder, $olMail, "", "", "", "<List the fields you want to retrieve here>", "", 1) If Not IsArray($aItems) Then Exit MsgBox(48, "OutlookEX Example Script", "Error searching mail items. @error = " & @error & ", @extended: " & @extended) ; Write records to export file $iResult = _OL_ItemExport("C:tempTest.csv", "", "", 1, "<List the fields you have retrieved here as header line>", $aItems) If @error <> 0 Then Exit MsgBox(16, "OutlookEX Example Script", "Error exporting data to file 'C:tempTest.csv'. @error = " & @error & ", @extended = " & @extended) Edited March 2, 2012 by water 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