Re: Styles in MS Word
Re: Styles in MS Word
- Subject: Re: Styles in MS Word
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 18 Jan 2005 19:37:46 -0800
On 1/18/05 7:19 PM, "Hanaan Rosenthal" <email@hidden> wrote:
> Anyone has any idea how to create style sheets in Word using
> AppleScript?
> I tried a few obvious combinations with the 'make' command and 'word
> style' object, but no luck.
> Paul B.?
Hi, Hanaan
Do you mean HTML CSS-type style sheets? I haven't the faintest idea how to
make those - I'm not even sure Word supports them. The HTML code you get in
Word - which is not liked by many browsers - appears "automatically" when
you "Save as Web Page", which can be done in Word 2004 AppleScript:
tell app "Microsoft Word"
set theDoc to active document
save as active document file name (path to desktop as Unicode text &
name of theDoc & ".htm") file format format HTML
end tell
You can then View/HTML source and see it all. You could edit the source too
if you wanted.
If you don't mean that, what do you mean by "style sheet"? Word documents
certainly have styles, and they are scriptable. There are indeed a few odd
bumps along the way - it's rather complicated. You can set styles of
paragraphs, you can modify existing styles (Heading 1, etc.) you cab make
new styles and apply them, all by script.
Perhaps you had better explain what you're trying to do. What exactly do you
want to do?
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden