APA - Scrivener->Word with Applescript

I hope that helps someone else, I looked for a solution to this issue and cobbled together this over time. This Applescript will convert formatted document to APA style word document. Utilizing MS Word TOC and Heading styles.

I need to deliver my draft file to my chair in Word format and he likes to see it correctly formatted. He is not really good at trusting that it will get there. So, to save time I created this Applescript to format my export from Scrivener into a APA format document. (no guarantee that it fits for requirements check formatting). I usr Scrivener to write, Papers to Cite, and Word to deliver drafts or final documents

In Scrivener, I do not concern myself with formatting but I add the following flags to indicate specific styles for conversion in Word. These flags pre-seed the paragraph to be formatted. For example:

= Heading 1

= Heading 2

~ = Title page
and all other text is formatted as normal. See script for style list details that include “Title”, “block quotation”, “Quote”, “List Bullet”, “List Number”, “Block Text”, “Heading 1”, “Heading 2”, and “Heading 3.”

The formatted file is exported as a RTF or Word file. Then open the file in Word an run the script, either directly from Applescript editor or as a Word Applescript menu(which I do not see in Office365).
The script will set styles, apply styles. create 2 sections (front matter, and body) and number pages, insert formatted word docs appendices, and then create TOC based on headings.

Also, if anyone has suggestion to make this better, please share. I have put too many hours into this and I need to finish this dissertation but I hope this helps someone. :smiley:
WordStylesProcessShared.scpt.zip (29.8 KB)

1 Like

Probably a stupid question…how do I install this script?

I haven’t looked at the script, but I guess the standard thing would be to download it, unzip it, and put it in the Scripts folder inside your Library folder, then run it from the Scripts menu in Finder. And be prepared to do a lot of work if it doesn’t function as you expect. AppleScript is fine for those who know how it works, and potentially frustration squared for those who don’t.