How to view the slide number 5 of a powerpoint document using AS

Hi,

In a powerpoint presentation file, we have a number of sildes (for example, 20 slides). I want to write a applescript code to view the silde number 5 so that this particular slide will be viewed on the powerpoint window. (we are not using slide show option here).

Could any one help me on this.

Or else

Is it possible to paste a copied item to a specific slide. For example, if a text is copied into a clipboard, this text should be placed in slide number 5.
We tried this, but the copied text is placed in the first slide instead of slide number 5.

Thanks,
Gopal

This code should do the trick:


tell application "Microsoft PowerPoint"
	activate
	set theView to view of document window 1
	go to slide theView number 5
end tell

Yes. I am sure, that you will be most interested in reading this post, especially the part, where this code is presented:


set content of text range of text frame of shape 1 of newSlide to "Surgery - Elective"