Re: Word script
Re: Word script
- Subject: Re: Word script
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 23 Aug 2016 18:33:57 +0000
- Thread-topic: Word script
Here's a quick and dirty version that gives you an idea as to how to
approach this.
tell application "Microsoft Word"
tell document 1
set the style of every paragraph to "Normal"
set the style of every character to "normal"
end tell
end tell
This changes both the paragraph styles and the character styles.
You need to use the exact name of the style (not sure if it's case
sensitive). If you're not sure what the style names are you can run this
script to get a list (it's usually pretty long, because, you know, it's
Word).
tell application "Microsoft Word"
activate
tell document 1
return name local of every Word style
end tell
end tell
HTH
ES
On 8/22/16, 7:01 PM,
"applescript-users-bounces+ed.stockly=email@hidden on
behalf of BC"
<applescript-users-bounces+ed.stockly=email@hidden on
behalf of email@hidden> wrote:
>I want to pass a batch of text documents (opened in Automator with the
>"Open Word Documents" action) to the script which would in turn tell
>Microsoft Word (2008) to set the style of the text in the documents to
>Normal.
>
>In Word, there is a command called "NormalStyle" which can be assigned a
>keyboard shortcut. But how can I get Applescript to recognize it, as well
>as apply it to several documents at the same time?
>
_______________________________________________
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