Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Set format of text to Right using AppleScript in MS Word?

Set format of text to Right using AppleScript in MS Word?
Thread Tools
Forum Regular
Join Date: Sep 2001
Location: Malvern, PA
Status: Offline
Reply With Quote
Feb 20, 2002, 03:59 PM
 
I am just trying to do a simple Applescript but it wont work! I am trying to have the font format set to the right side. Here is what I have, but it doesnt work:

tell application "Microsoft Word"
set justification to right
end tell

Does anyone know how to do it?

Also I am interetested in using AppleScript, but I cant figure out how to use the Script Dictionaries. How do you use them?

Thanks,
Dan
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Feb 22, 2002, 01:55 AM
 
Originally posted by zurek106:
<STRONG>I am just trying to do a simple Applescript but it wont work! I am trying to have the font format set to the right side. Here is what I have, but it doesnt work:

tell application "Microsoft Word"
set justification to right
end tell

Does anyone know how to do it?

Also I am interested in using AppleScript, but I cant figure out how to use the Script Dictionaries. How do you use them?

Thanks,
Dan</STRONG>
The "Justification" is applied to a character or paragraph, not an entire document. So you need to have a reference for it, like this:

tell application "Microsoft Word"
  set justification of every character to right
end tell

It will change the justification of every character to right, and thus everything will go to the right.

As for reading dictionaries, it is rather simple once you figure it out. I actually started a tutorial for it a couple months ago but never finished it, I'll try to finish it in a couple days though. If I catch you on AIM then I can help you out directly.

Hope this helps
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:07 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2