How can I export or copy charts to power point?
by S291bGxh » Tue, 31 Oct 2006 14:21:01 GMT
Hi I have 1 workbook which contains 4 sheets. Each sheet has 2 charts and I
want all that charts in each sheet to copy them or export them to powerpoint.
I want to do that by VBA Excel Code. I already have my code for opening the
specific ppt file. But I cannot transfer/copy/export the charts. Is there any
help please?
I put my code for opening the ppt file.
Sub openppt()
Dim Brocoli As Object
Dim Potato As Object
Dim carot As String
carot = "C:\Test\THIS IS A TEST.ppt"
Set Brocoli = CreateObject("powerpoint.Application")
Brocoli.Visible = True
Set Potato = Brocoli.Presentations.Open(Filename:=carot)
Call copycharts
End Sub
RE: How can I export or copy charts to power point?
by S291bGxh » Tue, 31 Oct 2006 15:07:02 GMT
Also here is my code for transfer charts is that right?
An error "Object doesnt support this property or method" is given
Public Function Test()
Dim xl As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
'Dim i%
Set xl = New Excel.Application
Set wb = xl.Workbooks.Open("C:\Test\SEQS.xls")
Set ws = wb.Worksheets(1)
With ActiveWindow.Selection.SlideRange
For i = 1 To 3
.Shapes("Rectangle 2").TextFrame.TextRange.Text = ws.Cells(i,
1).Value
.Shapes("Rectangle 3").TextFrame.TextRange.Text = ws.Cells(i,
2).Value
ActiveWindow.Presentation.PrintOut 1, 1
Next i
End With
Set ws = Nothing
wb.Close SaveChanges:=False
Set wb = Nothing
xl.Quit
Set xl = Nothing
End Function
Re: How can I export or copy charts to power point?
by Jon Peltier » Wed, 01 Nov 2006 07:23:57 GMT
http://www.**--****.com/
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://www.**--****.com/
_______
Similar Threads:
1.Copy/Export/Transfer charts from Excel to power point with VBA cod
Hi I want to copy/export/transfer charts from Excel to powerpoint. I have a
workbook which contains 4 sheets with 2 charts in each sheet. I want each
chart to appear to a separate slide in power point. I want to do that with
VBA code. I already have some code put it doesnt works.
The ppt file opens ok but in the function gives an error "Object doesnt
support this property or method"
Sub openppt()
Dim pptapplication As Object
Dim pptopen As Object
Dim pptpath As String
pptpath = "C:\Test\THIS IS A TEST.ppt"
Set pptapplication = CreateObject("powerpoint.Application")
pptapplication.Visible = True
Set pptopen = pptapplication.Presentations.Open(Filename:=pptpath)
End Sub
Public Function Test()
Dim xl As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
'Dim i%
Set xl = New Excel.Application
Set wb = xl.Workbooks.Open("C:\Test\SEQS.xls")
Set ws = wb.Worksheets(1)
With ActiveWindow.Selection.SlideRange ****HERE IT GIVES THE ERROR ****
For i = 1 To 3
.Shapes("Rectangle 2").TextFrame.TextRange.Text = ws.Cells(i,
1).Value
.Shapes("Rectangle 3").TextFrame.TextRange.Text = ws.Cells(i,
2).Value
ActiveWindow.Presentation.PrintOut 1, 1
Next i
End With
Set ws = Nothing
wb.Close SaveChanges:=False
Set wb = Nothing
xl.Quit
Set xl = Nothing
End Function
2.Creating charts in excel and exporting to Microsoft Power Point 03
3.copy paste problems for chart from excel to power point, solut
4.copy paste problems for chart from excel to power point, solution
I am really having troubles copying excel charts to power point, the charts
are getting messed up after copying and pasting to power point. I tried
everyting, turned off auto scale and selected the don't move or resize with
cells option and still having the same problem, any idea how to fix that?
Thanks!
5.Copy multiple charts from Excel to Power Point
I want to copy multiple charts at the same time into PowerPoint. I can only
copy one chart at a time and my presentation includes 34 charts,
Thanks
6. pasting charts form excel 2 power point, Chart cutoff right side
7. Chart data (excel format) in power point charts
8. Exporting Data from Excel into Power Point