moving excel graphs and data to Powerpoint

Hi All,

I need some help with moving multiple graphs and data tables from excel to PowerPoint.  I have an excel file that has a couple of charts and tables on each tab that I need to move specific charts to specific slides and location within PowerPoint. (and data tables).  I have to do this every month and it is a lot of work, so I was hoping someone could help me with a macro.  I think the difficult part is the placement of the graphs and data tables within each slide.  

Thanks,
Montrof
LVL 1
montrofAsked:
Who is Participating?
 
nutschConnect With a Mentor Commented:
I have this excel file that should be able to help you. I haven't used it in a while but it should be relatively self-explanatory.

T


Transfer-XL-to-PPT---Activity-Re.xls
0
 
montrofAuthor Commented:
This is perfect Thanks
0
 
montrofAuthor Commented:
I do seem to get an error when i runt he macro . it says -2147188160 Method "Item' of object 'Slides' failed: Slide3
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
montrofAuthor Commented:
Also How do I figure out the size and position in ppt so I can replicate that?
0
 
nutschCommented:
to figure out size and position, you can run a macro in powerpoint like this

Sub asdgfasdg()
Dim shp As Shape

For Each shp In ActivePresentation.Slides(1).Shapes
    Debug.Print shp.Left
    Debug.Print shp.Width
Next

End Sub

Open in new window

0
 
nutschCommented:
are you getting the error on the first transfer? What line of the macro?

T
0
 
montrofAuthor Commented:
Yes I get an error just about every time, It still seems to run.
0
 
nutschCommented:
Still does the job?
What line does the error comes at (if you click debug)
0
 
montrofAuthor Commented:
Does not give me the option to debug just hit ok.  Also when I run the ppt macro you provided where do I see the results.
0
 
montrofAuthor Commented:
Also what about the hieght of the graph because I ran the debug and took the exact values and it does not match what I had before.
0
 
nutschCommented:
in the immediate window (Ctrl+G in the visual basic editor)
0
 
montrofAuthor Commented:
One more question when I run the code to see the position size and so forth. It just gives me values but I do not know what they relate to or which shape on the slide they pertain to.
0
 
montrofAuthor Commented:
IF I wanted to take the macro and control toolbox sheet and insert it into a workbook, how would I change it so you do not need to input the excel path and instead just use the active workbook.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.