Location of Pages Template. I'm writing a Macro from Keyboard Maestro.

I am writing a Macro from Keyboard Maestro. I need to know the directory path for templates in the template chooser. I need to place the path in keyboard Maestro so it can get its template to fill in.

MacBook Pro 15″, macOS 15.6

Posted on Sep 16, 2025 12:18 PM

Reply
1 reply

Sep 16, 2025 12:35 PM in response to macmikeal

The normal means to script Pages is with its AppleScript scripting dictionary accessible via Apple's Script Editor.


The Pages templates that Apple distributes are within the application bundle. Those that you have created are in:

/Users/username/Library/Containers/com.apple.iWork.Pages/Data/Library/Application\ Support/User\ Templates


The AppleScript scripting dictionary for Pages will give you programmatic access to the internal Pages application templates as per this example:

set newdoc to (make new document with properties {name:"foo", template:template "Blank"})


There is no guarantee that any hardcoding into the application bundle to access its templates will not break in the future should Apple name or locate them differently than present.

Location of Pages Template. I'm writing a Macro from Keyboard Maestro.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.