• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Copying PowerPoint Slide Background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Copying PowerPoint Slide Background


  • Subject: Copying PowerPoint Slide Background
  • From: Doug Zwick <email@hidden>
  • Date: Tue, 8 May 2007 10:48:15 -0600

I have an AppleScript where I'm trying to copy the background of a PowerPoint (2004) slide (placing an image on the clipboard, from there I save it to a PICT file, and then convert that to a PNG file using Image Events). From reading the AppleScript dictionary for PowerPoint, I would expect this to work:

tell application "Microsoft PowerPoint"
	set curSlide to slide 1 of the active presentation
	copy shape background of curSlide
end tell

However, I get an error:

background of slide 1 of active presentation doesn't understand the copy shape message

The dictionary indicates that the background property of class slide is a shape, and shapes are supposed to respond to copy shape. I have verified that the object referenced by the background property is a shape (get class of background of curSlide returns "shape"). Am I not using copy shape correctly? I can successfully copy shape shape 1 of curSlide (get clipboard info shows a picture on the clipboard, and I can display the PICT of the shape in Preview.app), so I think I have the syntax right.

So far, the best work-around I have come up with is to create a new, dummy presentation, copy the slide and paste it into the dummy presentation, delete all the foreground shapes, and then copy that slide. That would be a really ugly hack.

Can anyone tell me how to get this to work, or suggest another work- around? Using the do Visual Basic function is not an option, as VBA will not be present in the next PowerPoint release.

_______________________________________________
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
  • Follow-Ups:
    • Error of Type -10827 has occurred
      • From: Gil Dawson <email@hidden>
  • Prev by Date: Re: Strange error message when using script bundle, stack overflow?
  • Next by Date: Error of Type -10827 has occurred
  • Previous by thread: Re: Keystroke quit working
  • Next by thread: Error of Type -10827 has occurred
  • Index(es):
    • Date
    • Thread