Re: PowerPoint
Re: PowerPoint
- Subject: Re: PowerPoint
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 29 May 2005 17:07:55 -0700
- Thread-topic: PowerPoint
Title: Re: PowerPoint
On 5/29/05 4:15 PM, "Michael Ghilissen" <email@hidden> wrote:
While you are enjoying your long week-end, I have been wondering how I could fit a fairly long variable, prepared in AS, to a PowerPoint slide.
The slide is well created, but does not contain the whole content of the slide_content
tell application "Microsoft PowerPoint"
set this_slide to make new slide at the end of this_presentation ¬
with properties {layout:slide layout text slide, auto size:shape to fit text}
set the title_text to text range of text frame of shape 1 of this_slide
set the subtitle_text to text range of text frame of shape 2 of this_slide
set content of the title_text to slide_heading
set content of the subtitle_text to slide_content
end tell
Only approx. 300 out of 450 characters are transferred to the text range. The auto size property does not help.
Any idea what the problem is?
There seems to be a bug restricting text to 255 characters (an ominous total).
First of all, you haven't scripted it correctly. You've used an 'auto size' property from somewhere or other, but there is no such property of class 'slide', so it's not doing anything there. (It compiles since it is a proper keyword.) 'auto size' is a property of text frame, so this should work:
set slide_heading to "Slide Heading Here"
set slide_content to "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog
" -- 686 characters
tell application "Microsoft PowerPoint"
set this_presentation to make new presentation
set this_slide to make new slide at the end of this_presentation ¬
with properties {layout:slide layout text slide}
set content of text range of text frame of shape 1 of this_slide to slide_heading
tell text frame of shape 2 of this_slide
set its auto size to shape to fit text
set content of its text range to slide_content
set real_content to get content of its text range
set l to count real_content --> 255
end tell
end tell
I suspect it may also be a bug in its VBA equivalent. I'll find out. If I find a workaround, I'll let you know.
--
Paul Berkowitz
_______________________________________________
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
References: | |
| >PowerPoint (From: Michael Ghilissen <email@hidden>) |