Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends,
As I need your help in exporting QV to PowerPoint as I can export the images into Powerpoint but I need to export a Pivot table as a image to export.
I have attached the written code below, as I don't know the exact property or method for Pivot table.
CH66 is a pivot table
Sub Export_All_Chart_To_PPT()
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True ' Create a presentation
Set PPPres = PPApp.Presentations.Add
ActiveDocument.GetSheet("SH05")
ActiveDocument.Sheets("SH05").Activate
ActiveDocument.GetApplication.WaitForIdle
'vCompareDate = ActiveDocument.Variables("vComparaison").GetContent.String
' Slide 4
Set PPSlide4 = PPPres.Slides.Add(PPPres.Slides.Count + 1,11)
PPSlide4.Shapes(1).TextFrame.TextRange.Text = " prix /kg"
PPSlide4.Shapes(1).TextFrame.TextRange.Font.Size = "28"
Set PPtitle4 = PPSlide4.Shapes.AddTextBox(1, 40, 110, 400, 20)
With PPtitle4.TextFrame.TextRange
.Text = "Prin:"
.Font.Size = 15
.Font.Color.RGB = RGB(233, 93, 14)
End With
ActiveDocument.GetSheetObject("CH66").CopyBitmapToClipboard
with PPSlide2.Shapes.Paste
.Left = 30
.Top = 320
end with
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
End Sub
Regards
Ammu