Sendkeys to paste excel worksheet object to powerpoint

A

Aaron

Ok, I've read lots of code but I don't see any way to copy a range of cells
and paste it as a worksheet object in powerpoint. Will someone help me
resort to Sendkeys? So far I've got:

Sub Paste()
Dim objPPT As Object
Dim objPres As Object

ActiveWorkbook.Sheets("UTL").Range("L1:AD40").Copy

Set objPPT = CreateObject("PowerPoint.Application")
Set PPApp = GetObject(, "Powerpoint.Application")
objPPT.Visible = True
Set objPres = objPPT.presentations.Open("C:\documents and
Settings\scuap\desktop\test.ppt")

PPApp.ActiveWindow.View.GotoSlide 2
' from here in PP I would need to:

Alt E 'selects the edit menu
arrow down six times 'gets me to the paste special option
enter 'selects the paste special option
'as excel worksheet object is the default, so no stroke needed
tab 'gets me to the ok button
enter 'selects ok and pastes my worksheet object on the selected slide.

End Sub

Can it be done this way??? Please anyone!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top