powerpoint >> Setting vertical alignment using AppleScript

by Jack » Wed, 08 Sep 2010 12:27:37 GMT

I am trying to set the vertical alignment (aka "baseline alignment" in
AS terms I believe) of the text in the footer of the Notes Master in a
presentation. (I've been working on this too long, the description
sounds like AS... )

The following runs, setting everything fine, except for the vertical
alignment. The baseline alignment is indeed set, but the vertical
alignment of the text in the footer is not changed.

Any suggestions?

Thanks, Jack

set allPlaceHolders to place holders of notes master of active
presentation

if (count of place holders of notes master of active presentation) >
0 then
-- Can't say "get every place holder" here, must use "item"
repeat with thePH in (get every item in allPlaceHolders)


if placeholder type of thePH is placeholder type header placeholder
then
set visible of thePH to false

else if placeholder type of thePH is placeholder type date
placeholder then
set visible of thePH to false

-- The "title" place holder contains the slide image
else if placeholder type of thePH is placeholder type title
placeholder then
-- set titlePHProps to properties of thePH
set visible of thePH to true
set width of thePH to 450
set height of thePH to 350
set top of thePH to 32
set left position of thePH to 45

-- The "body" place holder contains the text of the notes
else if placeholder type of thePH is placeholder type body
placeholder then
set visible of thePH to false


else if placeholder type of thePH is placeholder type footer
placeholder then
set footerPHProps to properties of thePH
set visible of thePH to true
set width of thePH to 360
set height of thePH to 36
set top of thePH to 684
set left position of thePH to 0
set text alignment of word art format of thePH to left text effect
alignment
set baseline alignment of paragraph format of paragraph 1 of
paragraphs of text range of text frame of thePH to baseline align center
--tell paragraph format of paragraph 1 of paragraphs of text range
of text frame of thePH
--set baseline alignment to baseline align center
--end tell
-- set font placement to middle
set font name of font of text range of text frame of thePH to
"Bookman Old Style"
set font size of font of text range of text frame of thePH to 9

else if placeholder type of thePH is placeholder type slide number
placeholder then
set width of thePH to 120
set height of thePH to 36
set top of thePH to 684
set left position of thePH to 420
set text alignment of word art format of thePH to right text
effect alignment
set baseline alignment of paragraph format of paragraph 1 of text
range of text frame of thePH to baseline align center
-- set font placement to middle
set font name of font of text range of text frame of thePH to
"Bookman Old Style"
set font size of font of text range of text frame of thePH to 9
set content of text range of text frame of thePH to "Page >#>"
end if

end repeat

end if


Similar Threads

1. Setting vertical alignment using AppleScript

2. Vertical alignment and Autofit

I have a slide with 2 text boxes. The top one's vertical alignment is "top" 
and the bottom one's is "bottom".

Before I upgraded to 2007, I could copy this slide over and over again, 
change the contents of each box as required, and then the text box would auto 
resize according to the number of lines. (The top one anchored from its top 
edge, and the bottom one anchored from its bottom edge.)

I've opened these same slideshows in 2007, but now when I edit the bottom 
text box, it resizes with its top edge fixed, not its bottom edge, despite 
the fact that the text alignment is set to "bottom". (I have "Resize shape to 
fit text" selected)

The original method described was simple, clean and intuitive. How do I 
replicate this in 2007?

3. Applescript to set font attributes?

4. How to print-to-file using Applescript?

Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Intel

Hi,

I'm trying to do some applescripting for fun. I use the Apple Script editor to do this. One thing I'd like to do is use the print out command to print to a file. I use the following code:

tell application "Microsoft Powerpoint"
  print out active presentation print to file "/Users/Shared/test.pdf" without showDialog
End tell

However, this doesn't print anything to this file. If I previously print to a PDF using the dialog (by hand), then this appears to in fact overwrite that old file.

How does this command work? Should I show the dialog and use the script to sort of emulate the button pressing as if I were going to press "PDF" -> "Save as PDF" etc?

5. Add notes in a presentation using applescript

6. Embedding hidden data in a slide using Applescript

    I'm in the process of creating a new solution to replace the VBA
AddIn we've been distributing for a few years now.

    With VBA, I could add tags to a shape (picture) that I placed on a
slide, and those tags could contain strings of data that I later
retrieve when the slideshow runs.

    The Applescript dictionary for PowerPoint doesn't expose a tags
collection. So now I'm left looking for a way to embed hidden data
either on the slide or on the shape. There is a "comments" element in
the shape object, but so far I haven't figured out how to add comments
to a shape in Applescript. Perhaps I just don't have the syntax right.
Even then, I don't know if comments attached to a shape get displayed
when the presentation runs.

    Anybody got any suggestions?

...Thanx...
...Eric Crichlow...
...Interwrite Learning...

7. How to set up a gradient fill of light dark light vertical bars

8. Problems linking horizontal and vertical shows via Action Setting

I am trying to link two presentations using the Action Settings dialog box 
pull-down in the Slide Show menu. One presentation is portrait (vertical) and 
the other is landscape (horizontal). 

It worked the first time I tried it but now I cannot get it to link, i.e., 
go from one to the other and back again during the slide show. The 
horizontally oriented show is quite large (105 slides with 1 mb files per 
page--they are photographs) and the vertical show only has 19 slides (also 
about 1 mb per page). I tried using both the "mouse over" and the "mouse 
click" options in the Action Settings dialog.