Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I am trying to copy Qlikview objects in a powerpoint slide as an 'Object', and not as an 'image' and am facing two problems here:
1) The below code is successfully coying objects from one sheet(SH05), but once the other sheet (SH04) is activated, its not coying the object from this one. The clipboard have object from the earlier sheet only(SH05)
2) I need to copy the Qlikview object in a powepoint slide as an 'Object' and not as an 'image'.
ActiveDocument.GetSheetObject("CH25").CopyBitmapToClipboard will always copy as an image, Is there a method to copy the object as an 'Object'.
Many thanks in advance.
This is what i have written:
Sub ExportPPT
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
Set PPSlide = objPresentation.Slides.Add(1,11)
set up = ActiveDocument.GetApplication.GetUserPreferences
up.ChartUseCapNBorder = True
ActiveDocument.GetApplication.SetUserPreferences up
with objPresentation.Slides(1).Shapes(1)
.TextFrame.TextRange = "Supervisory Controls"
'.Left = 100
'.top = 100
'.width=75
'.height=25
end with
ActiveDocument.Sheets("SH05").Activate
ActiveDocument.GetSheetObject("CH23").CopyBitmapToClipboard
with objPresentation.Slides(1).Shapes.PasteSpecial(PasteHTML)
.Left = 100
.top = 125
.width=400
.height=150
end with
ActiveDocument.GetSheetObject("CH25").CopyBitmapToClipboard
with objPresentation.Slides(1).Shapes.Paste
.Left = 100
.top = 300
.width=100
.height=125
end with
ActiveDocument.GetSheetObject("CH26").CopyBitmapToClipboard
with objPresentation.Slides(1).Shapes.Paste
.Left = 400
.top = 300
.width=100
.height=125
end with
Set PPSlide = objPresentation.Slides.Add(2,11)
with objPresentation.Slides(2).Shapes(1)
.TextFrame.TextRange = "Resource Forecasting"
end with
ActiveDocument.ActivateSheetByID "SH04"
'ActiveDocument.Sheets("SH04").Activate
ActiveDocument.GetSheetObject("CH22").CopyBitmapToClipboard
objPresentation.Slides(2).select
with objPresentation.Slides(2).Shapes.Paste
.Left = 100
.top = 125
.width=400
.height=150
end with
ActiveDocument.GetSheetObject("CH28").CopyBitmapToClipboard
with objPresentation.Slides(2).Shapes.Paste
.Left = 100
.top = 300
.width=100
.height=125
end with
Set PPSlide = Nothing
Set PPPres = Nothing
End sub