Ce qui suit AppleScript lancera Gestionnaire de profil Outlook.app vous permet ensuite de choisir la profil à partir d'une liste, sélectionne l'élément de la liste choisi, quitte la liste. Gestionnaire de profil Outlook.app et active Outlook.app
Vous pouvez ajouter un Exécuter AppleScript à la commande Automator workflow et insérer le texte suivant AppleScript ou l'exécuter dans script Editor.app .
Testé avec MacOS Big Sur.
tell application id "com.microsoft.outlook.profilemanager" to activate
tell application "System Events"
tell its application process "Outlook Profile Manager"
set frontmost to true
repeat until exists of group 1 of window 1
delay 0.1
end repeat
set theProfiles to get value of text field 1 of rows of ¬
table 1 of scroll area 1 of group 1 of window 1
tell current application
activate
set chosenProfile to (choose from list theProfiles with title ¬
"Choose Profile" with prompt "Choose Profile" OK button name ¬
"OK" cancel button name "Cancel") as text
if chosenProfile = "false" then
tell application id "com.microsoft.outlook.profilemanager" to quit
return
end if
set theCount to 1
repeat with i from 1 to count of theProfiles
set thisItem to item i of theProfiles
if thisItem = chosenProfile then
exit repeat
else
set theCount to theCount + 1
end if
end repeat
end tell
set frontmost to true
repeat until exists of group 1 of window 1
delay 0.1
end repeat
set selected of row theCount of table 1 of scroll area 1 ¬
of group 1 of window 1 to true
click menu button 1 of group 1 of window 1
click menu item "Set as Default" of menu 1 of ¬
menu button 1 of group 1 of window 1
end tell
end tell
tell application id "com.microsoft.outlook.profilemanager" to quit
repeat while application id "com.microsoft.outlook.profilemanager" is running
delay 0.1
end repeat
tell application id "com.microsoft.Outlook" to activate