Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Default Filename for a New Pages Document

When I collect articles from the web and save them in Word or Beans, the file name defaults to the first line (title) of the document. When I save a new document in Pages, the default file name is Untitled. Is there a way to make Pages use the first line of a new document as the default filename?
This is very useful as the Save Dialog box sits right over the top of the document where the Title is displayed.
If this feature is not yet available, what is a good work around?

PPC G5, Mac OS X (10.5.8)

Posted on May 17, 2010 7:50 PM

Reply
8 replies

May 17, 2010 9:55 PM in response to PeterBreis0807

Peter I think you are describing how to copy the name of a file that has already been saved into the document. I am using Default Folder and all the files are grey when I try to save a new Pages document. When I hold the Command key and click on a filename in the Save dialog, nothing happens.

My problem is that I have just created a Pages document and want the first line of the document to be used as the filename under which the document is saved.

Tom

May 17, 2010 11:25 PM in response to TomMcIn01

Tom

That method works everywhere in OSX to copy the name of an existing file which was what I thought you were asking for.

Default Folder has some settings that negate or alter the above behavior, look into your settings to see what the command key is doing. It can also be set to jump to a clicked on external folder.

You can copy text from inside the file and paste that into the name.

Peter

May 18, 2010 6:48 AM in response to TomMcIn01

This script achieves your goal.

--

--[SCRIPT saveAs1stParagraph]
(*
Enregistrer le script en tant que Script : saveAs1stParagraph.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Pages:
Il vous faudra peut-être créer le dossier Pages et peut-être même le dossier Applications.
Copier la chaîne de caractères à utiliser comme nom du document.
menu Scripts > Pages > saveAs1stParagraph
Le script ouvre le dialogue "Enregistrer sous …" et y colle le nom retenu.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Save the script as a Script: saveAs1stParagraph.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Maybe you would have to create the folder Pages and even the folder Applications by yourself.
Copy the string to use as filename.
menu Scripts > Pages > saveAs1stParagraph
The script opens the "Save As…" dialog and paste the selected name in the target field.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (VALLAURIS, France)
2010/05/18
*)
--=====
property theApp : "Pages"
--=====
on run
set the clipboard to paragraph 1 of (the clipboard as text)
my raccourci(theApp, "s", "cs") (* Save as… *)
my raccourci(theApp, "v", "c") (* Paste *)
end run
--=====
on activateGUIscripting()
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true (* to be sure than GUI scripting will be active *)
end tell
end activateGUIscripting
--=====
(*
==== Uses GUIscripting ====
*)
(*
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
*)
on raccourci(a, t, d)
local k
tell application a to activate
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
--[/SCRIPT]
--


Yvan KOENIG (VALLAURIS, France) mardi 18 mai 2010 15:48:40

May 18, 2010 10:15 AM in response to TomMcIn01

Thanks to all of the responders. For the short term, I will copy then paste the first line as recommended by fruhulda. In the longer term, I will try Yvan's script.

The followup question is "How do I ask the Pages Development Team to consider adding this feature to the program?" Do they follow these forums and note the good suggestions or is there a way that customers can request features?

Tom

Default Filename for a New Pages Document

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