Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

Exporting to PPT

Hi, I have used this macro but when I am exporting it creates sheet image in ppt

sub exportppt

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add

Set PPSlide = objPresentation.Slides.Add(1,11)

ActiveDocument.ActiveSheet.CopyBitmapToClipboard

PPSlide.Shapes.Paste

Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing

End Sub

9 Replies
PrashantSangle

Hi,

This is happening just because of in your macro you use,

ActiveDocument.ActiveSheet.CopyBitmapToClipboard

//This command copy your current active sheet as Bitmap.

PPSlide.Shapes.Paste

//This Command is used to paste that bitmap file in your PPSlide

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
vijetas42
Specialist
Specialist
Author

Ya,that I know,actually I want them as an object in qlikview so, how to do it?

PrashantSangle

Hi,

Sorry I did not understand what do you want?

Can you explain,

Which object you want to send in your ppt?

Is it only Active Object or all object from current Sheet?

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
vijetas42
Specialist
Specialist
Author

all object from sheet

VishalWaghole
Specialist II
Specialist II

Hi Vijeta,

Try with this code,

Set  objPPT = CreateObject("PowerPoint.Application")

       objPPT.Visible = True

set obj = ActiveDocument.GetSheetObject("LB01") 

             obj.CopyBitmapToClipboard()

             curSheet.Range("H" & 4).Select

             curSheet.Paste

- Regards,

Vishal Waghole

VishalWaghole
Specialist II
Specialist II

instead of LB01 put your object Id.

vijetas42
Specialist
Specialist
Author

Hi vishal,

I have tried your macro but ,it just opens blank ppt nothing else

vijetas42
Specialist
Specialist
Author

I have already replace object id my object id

VishalWaghole
Specialist II
Specialist II


Try using this code,

Sub ppt

'An array with the objects you want to export to powerpoint

Dim myArray(1)

myArray(0) = "LB01"


'Create ppt object

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add


For each item in myArray


Set PPSlide = objPresentation.Slides.Add(1,11)

ActiveDocument.GetSheetObject(item).CopyBitmapToClipboard

PPSlide.Shapes.Paste


Next


'Clean up

Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing


End Sub