J
Jim
Hey hi,
it seem odd but since i've never used any macros , i was wondering if
someone can help me out.
I was going thru the samples in Office suite, and came across a macro code
that would enable a person to put a chart straight in to ppt file.
here it goes:
This example copies the chart from the Chart Labels sheet into a new
Microsoft PowerPoint presentation.
Sub MS_PowerPoint()
Dim ppt As Object, pres As Object
'Create a Microsoft PowerPoint session
Set ppt = CreateObject("powerpoint.application")
'Copy the chart on the Chart Labels Demo sheet
Worksheets("Chart Labeling").ChartObjects(1).Copy
'Create a new document in Microsoft PowerPoint
Set pres = ppt.Presentations.Add
'Add a slide
pres.Slides.Add 1, ppLayoutBlank
'Make PowerPoint visible
ppt.Visible = True
'Activate PowerPoint
AppActivate ppt.Name
'Paste the chart
ppt.ActiveWindow.View.Paste
Set ppt = Nothing
End Sub
Now i've the code but i dont know how to implement it. Please advise as i'd
be really greatful
Thanks
Jim
it seem odd but since i've never used any macros , i was wondering if
someone can help me out.
I was going thru the samples in Office suite, and came across a macro code
that would enable a person to put a chart straight in to ppt file.
here it goes:
This example copies the chart from the Chart Labels sheet into a new
Microsoft PowerPoint presentation.
Sub MS_PowerPoint()
Dim ppt As Object, pres As Object
'Create a Microsoft PowerPoint session
Set ppt = CreateObject("powerpoint.application")
'Copy the chart on the Chart Labels Demo sheet
Worksheets("Chart Labeling").ChartObjects(1).Copy
'Create a new document in Microsoft PowerPoint
Set pres = ppt.Presentations.Add
'Add a slide
pres.Slides.Add 1, ppLayoutBlank
'Make PowerPoint visible
ppt.Visible = True
'Activate PowerPoint
AppActivate ppt.Name
'Paste the chart
ppt.ActiveWindow.View.Paste
Set ppt = Nothing
End Sub
Now i've the code but i dont know how to implement it. Please advise as i'd
be really greatful
Thanks
Jim