Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

PPT

Hi All,

My macro code is not working properly. while I'm exporting to ppt it is going to Edit module page. Why?

Thanks,

Krishna

1 Reply
bindu_apte
Creator III
Creator III

Hi,

Try using this code.

Sub ExportPPT

ActiveDocument.ActiveSheet.FitZoomToWindow

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add

    For i = 0 To ActiveDocument.NoOfSheets - 1

   '     Set MySheet = ActiveDocument.GetSheet(i)

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

   '     ActiveDocument.ActiveSheet.CopyBitmapToClipboard

  ActiveDocument.GetSheetObject("CH03").CopyBitmapToClipboard

        PPSlide.Shapes.Paste

  ActiveDocument.GetSheetObject("CH04").CopyBitmapToClipboard

        PPSlide.Shapes.Paste

    Next

Set PPSlide = Nothing

Set PPPres = Nothing

End sub