Automating Insert of Documents into a Pages File

I have created a Pages document with a page for each one of over 400 items by using mailmerge from a Numbers spreadsheet. Each item has various text fields which are successfully copied in from the spreadsheet. So far so good.

One of the fields is a filename referring to formatted text created TextEdit but stored in HTML.

I would like to use AppleScript or Automator to insert the text from the specified files into the Pages document, as part of each item’s page. Is this likely to be possible or am I barking up the wrong tree?

If it is, would you be able to point me in the redirection. You don’t need to code it for me, but just give me some clues.




If I understand correctly your question, you can’t do the trick during the merge task.
So, you would have to do the trick later which means:

  • open the Pages document
  • scan every section
    for each section
  • extract the path to the file to insert
  • open this file in TextEdit
  • select all, copy, close the TextEdit document
  • paste in the current section
  • go to next section

Yvan KOENIG (VALLAURIS, France) lundi 1 octobre 2012 10:26:22