Re: How to sve a image from Word document to hard disk
Re: How to sve a image from Word document to hard disk
- Subject: Re: How to sve a image from Word document to hard disk
- From: Stan Cleveland <email@hidden>
- Date: Tue, 18 May 2010 20:03:31 -0700
- Thread-topic: How to sve a image from Word document to hard disk
On 5/18/10 9:10 AM, "SHIVANK AGGARWAL, Noida" wrote:
> I want to store a image from Word document to hard disk using Applescript
> commands in JPEG format.
> Please let me know the details asap.
Hi Shivank,
Though I have no experience scripting images in Word, I decided to
experiment to see if I could achieve what you are asking. The following code
works here, using Word 2008. (It might also work with Word 2004, but there's
no guarantee--it certainly wouldn't hurt to try it.)
tell application "Microsoft Word" -- 2008
tell document "ContainsPicture.doc"
tell picture 1
-- next two commands return image to its original size, if desired
-- otherwise, the image is saved at the size it appears in Word
scale height factor 1.0 scale scale from middle ¬
with relative to original size
scale width factor 1.0 scale scale from middle ¬
with relative to original size
-- save the image
save as picture picture type save as JPG file ¬
file name "MacHD:Users:stanc:Desktop:Picture1.jpg"
end tell
end tell
end tell
HTH,
Stan C.
_______________________________________________
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