• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
export as .rtfd with Pages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

export as .rtfd with Pages


  • Subject: export as .rtfd with Pages
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 21 Oct 2008 12:21:45 +0200

Hello

I wrote a small script to export some datas grabbed from Numbers as .rtfd.

I copy a chart and its legend in the clipboard then run the script.

    --[SCRIPT]

    tell application "Pages"
       make new document
       my pasteIt()
       save front document
       set p_natif to get path of front document
    end tell

tell application "System Events" to tell disk item (p_natif as text)
set n to name
set d to path of container
end tell


if n ends with ".pages" then set n to text 1 thru -7 of n
set p_xport to (d as text) & n & ".doc"
tell application "Pages" to save front document as "SLDocumentTypeMSWord" in p_xport
set p_xport to (d as text) & n & ".pdf"
tell application "Pages" to save front document as "SLDocumentTypePDF" in p_xport
set p_xport to (d as text) & n & ".txt"
tell application "Pages" to save front document as "SLDocumentTypePlainText" in p_xport
set p_xport to (d as text) & n & ".rtf"
tell application "Pages" to save front document as "SLDocumentTypeRichText" in p_xport
set p_xport to (d as text) & n & ".rtfd"
tell application "Pages" to save front document as "SLDocumentTypeRichTextBundle" in p_xport


on pasteIt()
tell application "Pages" to activate
tell application "System Events" to tell (first process whose title is "Pages") to tell document 1 to keystroke "v" using {command down}
end pasteIt


--[/SCRIPT]

All works well except the attempt to export as .rtfd.
The result is not a .rtfd file but a .rtfd.pages document.

Is one of you knowing a working syntax or am I facing a bug ?

Yvan KOENIG (from FRANCE mardi 21 octobre 2008 12:21:41)



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Can we execute automator workflow in AppleScript?
  • Next by Date: Show Package Contents
  • Previous by thread: Can we execute automator workflow in AppleScript?
  • Next by thread: Show Package Contents
  • Index(es):
    • Date
    • Thread