AppleScript: Send To Word
Michael Terry
formido at mac.com
Mon Oct 14 03:32:01 PDT 2002
Hi,
For your puzzled perusal I submit my latest creation: It's called 'Send To
Word'. It's version is 1.0b3. Bet you're wondering what happened to betas 1
and 2.
What It Does:
-------------
Scans OmniOutliner for text contained in the Topic and Note columns.
Decides how many levels there are, then creates a Style in Word labeled
"OmniOutliner: n" where n is the level depth in OO.
Lovingly places each row of text and each note into Word in the
appropriate order, being careful not to harm the paragraph structure within
a row or note.
Applies the appropriate "OmniOutliner: n" Style to each paragraph. Note
text is given the Style "Normal".
Tells Word which outline level the paragraph came from so you can
examine the document in Word's outline view with the same structure in which
it was found.
Notifies you when it's all done.
What It Doesn't
---------------
Try to guess what text styles you've applied (if any) to your text in
OO. I would definitely do this--although there'd be some logical
complications--but, although OO should allow it, I don't seem to be able to
get this information.
If OO finds a row or note that has curly quotes or apostrophes, it only
gives AppleScript the text leading up to the naughty bit. If you wrote your
whole document in OO, that shouldn't be a problem; OO doesn't use curly
quotes. But if you copied text from a compromised source, you might be
exposed to danger. In that case you may want to do a find-and-replace
operation from the Find dialog to convert all these characters to their
straight counterparts.
It doesn't open vacuum-sealed jars of spaghetti sauce...yet.
So the theory is this: You write your document in OO, with all the benefits
of its hierarchical structure. Then when you're all done, you export to Word
and format it. Perhaps it's for the best that I couldn't export style
information. After all, we should really keep our content phase separated
from your formatting phase, don't you agree?
Since all rows from the same level have the same Word Style, it's a simple
matter to apply common formatting to them using Format->Style... In Word.
And if, while you're deciding what styles to apply, you want the advantage
of visually distinguishing the headings[1], you can bounce into outline view
and see what's what.
Cheers,
Mike
PS - This thing's gonna come in handy next semester!
[1] Although the text is presumably now divided among several Styles, all
the text looks the same initially--it's all the same font, etc. (well,
except for the note text--damnable exceptions!). Distinguish here between
styles, by which I mean font, underlining, bolding and so forth, and Styles,
which are the templates by which you define unique styles for potentially
non-contiguous (hey, that's like how people say the United States aren't
contiguous, right?)[2] text within a Word document.
[2] Right. That's because some of the United States are an island and
Alaska.
More information about the OmniOutliner-Users
mailing list