Sign in to follow this  
Followers 0
dazzy999

Outlook Import/Export wizard automation

15 posts in this topic

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

Share this post


Link to post
Share on other sites



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 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

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.

Thanks for your reply.

So how would this be done ? Is it through pure scripting or by simulating keyboard and mouse ?

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by water

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

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.

Share this post


Link to post
Share on other sites

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 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

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.

Share this post


Link to post
Share on other sites

Why do you want to change the order of address resolution?


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

Why do you want to change the order of address resolution?

It is a requirement for a project i am working on.

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 by water

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

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

Share this post


Link to post
Share on other sites

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 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

Glad to be of service. If you need a quick and dirty test script just let me know.

Will do thanks

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#15 ·  Posted (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 by water

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
Sign in to follow this  
Followers 0