Thanks to Stan and Steve (especially for the quick replies!)
Both of those worked great. I noticed that my Result for get
id of
signatures (or every signature)
is "{1, 2, 9, 10, 11}". Is this an array or just a list of strings?
For anyone who is interested here are some Unix scripts that also incorporate AppleScripts to use in Apple Remote Desktop.
This one checks the current server that Outlook users have since we use Office 365 and each user might have a different server.
It helps when troubleshooting connection issues.
######
MyShellVar=`osascript <<EOF
tell application "Microsoft Outlook"
set default_ID to default account
get the server of default_ID
end tell
EOF`
chopFront='https://'
chopBack='/EWS/Exchange.asmx'
MyShellVar=${MyShellVar#$chopFront}
echo ${MyShellVar%$chopBack}
######
And here is one that creates a new Signature with a name and html contents. We have started using Signatures to hold email templates for internal requests, etc. Very handy. Every new signature
you create gets a new id, but not sure how to reset the id counter. I suppose you could just specify the id during creation.
######
osascript <<EndOfMyScript
tell application "Microsoft Outlook"
set myNewSig to make new signature with properties {name:"Template Name", content:"<html>html stuff goes here</html>"}
end tell
EndOfMyScript
######
Jeff
From: Stan Cleveland < email@hidden>
Date: Thursday, March 21, 2013 2:41 PM
To: AppleScript Users < email@hidden>
Subject: Re: How to get all IDs of an object
On Mar 21, 2013, at 2:08 PM, Jeff Hanlon wrote:
I've been working with Outlook 2011 and have been trying to use AppleScript to get and set a few things like Signatures, Server Names, etc. I'm using the Microsoft Outlook.sdef dictionary in AppleScript Editor to try and figure things out but my very basic
knowledge of AppleScript is slowing me down.
I figured out for example how to get the name of the exchange account by referring to it by id number.
get the name of exchange account id 1
I've also done this with Signatures.
get plain text content of signature id 3
What I would like to know is how would I find out ALL of the account or signature ids? Is that possible?
For example when you delete a signature it doesn't remove that id. So if you add a bunch of signatures and then delete them, the next new signature might have an id of like 12. How could I find
out the last signature id or how could I view all of the signatures a user might have?
Is there a way to view all of the ids? Are the ids stored in an array or something?
Hi Jeff,
Try these:
get the name of exchange accounts
get plain text content of signatures
You should get back the results as lists of strings, which you can loop through to process the data.
Stan C.
|