Script for Outlook?

ToriAnneke
Contributor II

Hi all,

Off topic, sorta, but anyone know/have a script that can change/edit some fields in Outlook 2011.
I have an AppleScript I found that can do so (with a little bit of hair pulling). I'm pretty sure AppleScripts don't behave like Unix scripts in Casper.

We have about 100 macs and our Domain Controller changed. I need to visit every Mac manually to change this field but was hoping someone would have a better trick to do it from within JSS.

Thanks in advance!
--
Pat Camporeale
"From now on I will be referred to as Mister Pastulio"
![external image link](attachments/929542ae0d764cb592b6b3a14993754a)
Herengracht 258
1016BV Amsterdam

6 REPLIES 6

jarednichols
Honored Contributor

As far as I know, AppleScript is the most reliable way for interacting with Outlook's settings. We've got a first run Apple Script that pulls in user info and sets up the account and it works very well.

j
---
Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436

talkingmoose
Moderator
Moderator

Any possibility that you can get Exchange Autodiscover working in your
On 12/5/11 10:47 AM, "Pat Camporeale" <Pat.Camporeale at wk.com> wrote:
environment? That would be the easiest way to handle this because Outlook
checks for this type of change at every launch and periodically.

If not, then AppleScript is the only other automated way to get this to
work. This setting is not stored in a text file that you can manipulate
via the command line. The downside to using AppleScript for this is that
it can only run while a user is logged in and while Outlook itself
running. You're not going to be able to do this silently.

I suggest you somehow get your AppleScript to folks' machines and have
them trigger it manually. Not sure if Self Service would come in handy
here. You can launch Outlook if needed using the "activate" command and
then delete the script when done. If you have multiple users per machine
then you'll need to run the script per user.

--

William Smith
Technical Analyst
Merrill Communications LLC
(651) 632-1492

queohsi
New Contributor

Hey Dudes, anyone have an apple script that works for this? I've been trying to curl a file and throw a variable in the file path with a bash script example:

/Users/$USER/Documents/Microsoft User Data/Office 2011 Identities/Main Identity/Data Records/Preferences/0T/0B/0M/*/x20_3.olk14Pref

However the variable is proving to be more of a hassle than anticipated. I'm not very well versed with apple script, but seems like the "tell application 'Outlook' to do all this stuff I want" kind of syntax would work.

If anyone has anything they can share that would be stellar.

Thanks!
Kevin O'Connell | IT Support | Pandora

queohsi
New Contributor

Ok here's where I'm at, it "works" as far as the script putting the file I want where I want and chowning it to the correct user, but doesn't actually make the changes when I relaunch Outlook. Which is frustrating, because when I would put the settings to low and then manually put this file in to the correct location and relaunch Outlook it would be set to off.

#! /bin/sh
#Outlook Spam Filtering Off
#Last Update: 2012/11/28

DUDER=`/usr/bin/who | /usr/bin/grep console | /usr/bin/awk '{print $1}'`

DUDER2=$(sudo find /Users/$(/usr/bin/who | /usr/bin/grep console | /usr/bin/awk '{print $1}')/Documents/Microsoft User Data/Office 2011 Identities/Main Identity/Data Records/Preferences/ -name "*.olk14Pref")

curl -Lo /tmp/x20_3.olk14Pref http://file/share/to/curl/file/from/x20_3.olk14Pref

mv /tmp/x20_3.olk14Pref "$DUDER2"

sudo /usr/sbin/chown $DUDER "$DUDER2"
exit 0

So, has anyone taken a stab at this with applescript?

chad_fox
Contributor II

@jarednichols Sorry to bring back such an old thread but do you mind sharing the AppleScript for Outlook that you're using?

Josh_Smith
Contributor III

@chad.fox @talkingmoose's scripts are probably what you are looking for, he's got one for 2011 and one for 2016: https://github.com/talkingmoose