Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Development and Darwin (http://www.mac-forums.com/forums/os-x-development-darwin/)
-   -   Apple script (http://www.mac-forums.com/forums/os-x-development-darwin/286662-apple-script.html)

Anima Rani 10-12-2012 02:56 AM

Apple script
 
Hi,

How to convert the doc file in docx through apple script programming.

Thanx
Anima

vansmith 10-12-2012 10:53 AM

Any particular reason you want to do this? doc files should open fine in Word 2010/2011.

Anima Rani 10-13-2012 03:30 AM

I want to open the doc file and save as docx file.

vansmith 10-13-2012 10:49 AM

But why?

Regardless, take a look here. There's a section on opening files and saving them in different formats.

Anima Rani 10-17-2012 04:10 AM

I have written the following code ;

set mydoc to "/Users/hcl/Desktop/Sample.doc"
tell application "Microsoft Word"
activate
open mydoc
save as active document file format format document file name "Sample_new.docx"
close active document
end tell

But it not converting the doc to docx without compatibility. I want to save as the doc file into docx. Please help.


All times are GMT -4. The time now is 01:14 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.