Re: add a paragraph to the beginning of a doc
Re: add a paragraph to the beginning of a doc
- Subject: Re: add a paragraph to the beginning of a doc
- From: "Stephen Swift (aka Burnum)" <email@hidden>
- Date: Tue, 19 Jun 2001 22:38:24 -0400
At 6/19/01 6:18 PM, email@hidden (email@hidden) Wrote:
>
I am writing a script for BBEdit. The file that is being editing in BBEdit
>
is a MS Word file. I am trying to insert a paragraph at the beginning with:
>
set first paragraph of document to "Filename" & Return
This works, but its far from efficient. Any other suggestions?
set thefile to choose file with prompt "Select the file for BBEdit to open:"
tell application "BBEdit 6.1"
open thefile
set doc to (contents of window 1)
set (contents of window 1) to "Filename" & return & doc
end tell
You may want 2 returns to put one line of space between the paragraphs.
Donknow what you are actually trying to do.
Stephen Swift ?' The Burnum Man
email@hidden
-----------------------------------------------
"He was the only person I met who knew more about electronics than me." -An
exaggeration by Steve Jobs, explaining his initial fascination with Woz