schedule outlook script

chutiya
New Contributor

we're moving from Exchange to O365. One of the challenges we face is deployment. At the moment we have a script that auto configures all accounts for us. What we need is a way to add in a scheduled script in outlook that does NOT amend or tamper with any of the users existing data but prompts a second script to run (once only). Any ideas please? I know how to manually do this, but need to automate to send out as a composer packaged .dmg via casper.

thanks,

10 REPLIES 10

wmateo
Contributor

would you care to share this script? I am looking for a script to automate the configutation of Outlook on the client machines. @chutiya

chutiya
New Contributor

send email address, and I'll send it across.

hcodfrie
Contributor

Same here could you share it ?

SeanA
Contributor III

To run a script within Outlook will require AppleScript, and then that will need to run as a scheduled event within Outlook. I learned that from @talkingmoose][/url; he is the expert and he does share his knowledge in github (https://github.com/talkingmoose?tab=repositories) and elsewhere.

If you have already done so, check out his "Outlook-Exchange-Setup" script for ideas. Now, to run the second script so it does not affect the current user's data, I will plead ignorance, but that second script will still need to follow the same rules as the first one: be Applescript and have to run as a scheduled event.

chutiya
New Contributor

thanks @SeanA - I've been told by my project manager that I should be looking for where Outlook calls the scripts from and where the Outlook first run file is kept on macs. We want Outlook to call this script when users launch Outlook. If that makes sense.

calumhunter
Valued Contributor

you would probably have to try to deploy an applescript that opens outlook, opens the schedules menu, adds in a new item to run at startup, and have that item fire off talkingmoose's outlook auto configure script
You may need to use applescript and assistive access to have applescript hit the menu items and buttons etc etc.
below is the screenshot of where you need to be looking for the schedules.
external image link

chutiya
New Contributor

thanks @calumhunter - we know where to put the schedule in outlook. Its just how to automate this process we're struggling with. Through experience (I'm going to try it today) does anyone know if open composer take opening snapshot- do this process - take closing snapshot will capture all the information we need?

thanks,

calumhunter
Valued Contributor

@chutiya like i said i think you will need to create an applescript that actually automates this using GUI scripting. The applescript would need to do the following actions:

Open outlook on the client machine
open the schedules menu item
click the plus button
type in a name for the new schedule
click on menu for when and change it to "At Startup"
click on the action menu and change it to "run applescript"
click on the script button and hopefully find a way to put in the path to the configuration script. Im thinking that perhaps using "apple-shift-g" to bring up the path dialog and then you should be able to enter in the location of the configuration script

I hope that is a bit more clear? The reason for this is that outlook stores all its settings in the main identity database and so we need to use outlook to create the schedule and have it run the configuration script at next launch so that outlook can save this information in to the main identity database. So no taking a composer snap shot will not work as we need to modify the outlook main identity database directly and the only way to do that is using outlook.

have a look at http://www.macosxautomation.com/applescript/uiscripting/

chutiya
New Contributor

makes sense - thank you very much @calumhunter

Shoesmithlc
New Contributor III

I would like to know the script

Kde82@mac.com