Re: Word 2008 script broken in Word 2011
Re: Word 2008 script broken in Word 2011
- Subject: Re: Word 2008 script broken in Word 2011
- From: Luther Fuller <email@hidden>
- Date: Wed, 29 May 2013 15:01:43 -0500
On May 29, 2013, at 2:07 PM, Lists wrote: Shortly after Office 2008 came out I wrote several export to PDF scripts. After trying them in Office 2011, they work except for the Word export to PDF script.
The Word script creates a corrupt PDF that Preview can't open. I'm wondering if anyone has encountered this, and how did you fix it?
I experienced this problem in Mountain Lion with a GUI script that saves Mail messages to PDF.My problem was due to a bug in Mountain Lion or at least in Mt. Lion's Mail. I put the following code immediately after creating the PDF document ...
set fileSize to (size of pdfTempDoc) repeat 100 times -- 10 seconds delay 0.1 size of pdfTempDoc if fileSize < the result then set fileSize to the result else exit repeat end if end repeat
It prevents the script from continuing until AFTER writing to the document has completed. (In systems prior to Mt. Lion, the system does not report the file available for reading until writing has completed.)
When I first encountered this problem, I looked it up in some old books. It's called the "read-write problem". You can't read a file until "writing to disk or drum has completed". (What's a drum?) Apple allowed a very fundamental bug in Mt. Lion and should fix it!
|
_______________________________________________
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