Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export from Excel to Powerpoint
I have found different code to export a Range from Excel to PowerPoint. The
code I have is as follows: Sub RangeToPresentation() ' Set a VBE reference to Microsoft PowerPoint Object Library Dim PPApp As PowerPoint.Application Dim PPPres As PowerPoint.Presentation Dim PPSlide As PowerPoint.Slide ' Make sure a range is selected If Not TypeName(Selection) = "Range" Then MsgBox "Please select a worksheet range and try again.", vbExclamation, _ "No Range Selected" Else ' Reference existing instance of PowerPoint On Error Resume Next Set PPApp = GetObject(, "Powerpoint.Application") ' Reference active presentation Set PPPres = PPApp.ActivePresentation PPApp.ActiveWindow.ViewType = ppViewSlide ' Reference new instance of PowerPoint If Err.Number < 0 Then 'Err.Number 0 if no PP application is active or running. Then I will have to create one instance: Set PPApp = CreateObject("Powerpoint.Application") Set PPPres = PPApp.Presentations.Add 'Add a slide PPPres.Slides.Add 1, ppLayoutBlank PPApp.Visible = True 'Activate PowerPoint AppActivate PPApp.Name End If On Error GoTo 0 ' Reference active slide Set PPSlide = PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRa nge.SlideIndex) ' Copy the Excel range as a picture Selection.Copy 'Selection.CopyPicture Appearance:=xlScreen, _ Format:=xlPicture DOES NOT DO THE TRICK WITH BIG PICTURES SO I NEED TO COPY NORMALLY .... ' .. AND PASTE AS A PCITURE! ' Paste the range PPSlide.Shapes.PasteSpecial DataType:=ppPasteMetafilePicture 'Now I want to select the pasted Range. BUT HOW? ActiveWindow.Selection.SlideRange.Shapes(1).Select 'Now I want to add a new PP slide and activate that slide to paste another range: BUT HOW? 'END MACRO Any help appreciated!! Martin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export from Excel to Powerpoint
Hi Martin,
I have found different code to export a Range from Excel to PowerPoint. The code I have is as follows: You might have a quicker response by posting in the PowerPoint newsgroups. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export from Excel to Powerpoint
Just to make sure not to cross post, but OK, I´ll check out the other
PowerPoint pages! Martin "Stephen Bullen" wrote: Hi Martin, I have found different code to export a Range from Excel to PowerPoint. The code I have is as follows: You might have a quicker response by posting in the PowerPoint newsgroups. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Export Excel tuncating leading zeros while export to excel from da | Setting up and Configuration of Excel | |||
export re-order input fields to export file [csv] | Excel Worksheet Functions | |||
how do i create a macro to export a chart to powerpoint? | Charts and Charting in Excel | |||
How to export all chartobjects in a sheet to powerpoint (creating a new ppt file) as pictures? | Charts and Charting in Excel | |||
How to export a picture or chart from Excel to PowerPoint? | Excel Programming |