Word Document Page setup scripting?
Word Document Page setup scripting?
- Subject: Word Document Page setup scripting?
- From: Tod Hallberg <email@hidden>
- Date: Thu, 06 Oct 2005 09:50:55 -0500
- Thread-topic: Word Document Page setup scripting?
I am trying to script the page setup and layout of a text document.
I would like to have the page layout to be landscape.
I would like to have margins of : Top 1 inch, bottom .5 inch, left .5 inch,
right .5 inch.
Here is what I have so far:
set myDoc to (choose file) as alias
tell application "Microsoft Word"
run
end tell
tell application "Microsoft Word"
open myDoc
activate
if (count of documents) 1 then
set myOpenDoc to (get name of active document)
else
display dialog "No documents are open"
end if
activate object document myOpenDoc
--*)
set topMargin to "1"
set bottomMargin to ".5"
set rightMargin to ".5"
set leftMargin to ".5"
set top margin of document myOpenDoc to inches to points inches
topMargin
set bottom margin of document myOpenDoc to inches to points inches
bottomMargin
set right margin of document myOpenDoc to inches to points inches
rightMargin
set left margin of document myOpenDoc to inches to points inches
leftMargin
end tell
I get an error of can't set margin to 72 when it gets to the Top margin
line.
Any help would be greatly appreciated
Thanx
Tod
_______________________________________________
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