Apple Event: May 7th at 7 am PT

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

easier way to remove formatting

I've searched and seen a few answers on this, but none of them are what I'm looking for.


In Word, when you import a text, you can do Ctr+a to select the whole text, then both Opt+Space and after that Shift+Fn+Cmd+F9 which will totally strip everything out of the text, including hyperlinks.


In Libreoffice, you can just chose the text then select 'Default Formatting', even easier.


How to do it in Pages09? From reading the other threads in this forum, I've found that you can:


Paste & Match Style (Op+Shft+Cmd+v) which will give you a basic text. Another option seems to be to do an ordinary paste (Cmd+v) then double click 'Free Form' and click Character Styles 'None'.


Then you need to open the inspector, chose Links and uncheck 'Enable Hyperlinks' and possibly check 'Disable all hyperlinks' (this checkbox seems to be redundant given the first one, anyone know why its there?).


Phew...talk about a rigamarole....well, does anyone know an easier way of doing it? Back in 2008, someone suggested using Automotor to record the moves. Never tried using that so far, though I understand its just a macro recorder of some sort. Surely, come 2011, there is a simpler way to achieve this basic function?


So, how to import a text and clear ALL formatting (incl' hyperlinks) the easy way? Anyone??

MacBook Pro 2.53GHz Intel Core 2 Duo, Mac OS X (10.6.8), 4GB 1067 MHz DDR3

Posted on Jul 20, 2011 5:58 AM

Reply
Question marked as Best reply

Posted on Jul 20, 2011 7:09 AM

You may use my good old huge script.


--{code}

set the clipboard to the clipboard as text

--{code}


step 1 : select all the document's contents

step 2 : press cmd + x to move the contents from the document to the clipboard

step 3 : run the script

step 4 : paste in the document.


You may also use this new one which does the complete trick in a single call.


--{code}

--[SCRIPT remove_formatting]

(*

Enregistrer le script en tant que Script : remove_formatting.scpt

déplacer le fichier ainsi créé dans le dossier

<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:

Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.



Aller au menu Scripts , choisir Numbers puis choisir “remove_formatting”

It will save it as a dumb text file which it will open immediately.


--=====


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”.

Sous 10.6.x,

aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript

puis cocher la case “Afficher le menu des scripts dans la barre des menus”.


--=====


Save the script as a Script: remove_formatting.scpt


Move the newly created file into the folder:

<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:

Maybe you would have to create the folder Numbers and even the folder Applications by yourself.


Open a Pages document at front.

Go to the Scripts Menu, choose Numbers, then choose “remove_formatting”

It will save it as a dumb text file which it will open immediately.


--=====


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.

Under 10.6.x,

go to the General panel of AppleScript Editor’s Preferences dialog box

and check the “Show Script menu in menu bar” option.


--=====


Yvan KOENIG (VALLAURIS, France)

2011/07/20

*)

--=====


on run

set temp_path to (path to temporary items from user domain as text) & (do shell script "date +_%Y%m%d_%H%M%S.txt")


tell application "Pages"

save document 1 as "SLDocumentTypePlainText" in temp_path


openfiletemp_path

end tell

end run


--=====

--[/SCRIPT]

--{code}


Yvan KOENIG (VALLAURIS, France) mercredi 20 juillet 2011 16:09:10

iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8

Please : Search for questions similar to your own before submitting them to the community


To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

17 replies

May 27, 2013 5:56 AM in response to Jeff Shenk

Thanks, Jeff. 🙂


Scripting Pages directly is a nice answer, and you could make that into a shortcut key, too (either by the way I showed in the video or by using FastScripts).


Personally, I still prefer making the contents of the clipboard plain text, as it will work for pasting in any other app too (Notes, Reminders, iCal, etc etc).

easier way to remove formatting

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