Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need a macro that allows me to export to PowerPoint objects with different leaves and what I've done only exports the objects on the active sheet.
// Also in this line stops
// Sheet1.GetSheetObject("CH495").CopyBitmapToClipboard
Sub ppt
ActiveDocument.ActiveSheet.FitZoomToWindow
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add(True)
Set Sheet1= ActiveDocument.Sheets("SH02")
Set PPSlide = objPresentation.Slides.Add(objPresentation.Slides.Count + 1,11)
PPSlide.Shapes(1).TextFrame.TextRange.Text = "Excelencia"
Sheet1.GetSheetObject("CH495").CopyBitmapToClipboard
PPSlide.Shapes.Paste
Sheet1.GetSheetObject("CH493").CopyBitmapToClipboard
PPSlide.Shapes.Paste
Sheet1.GetSheetObject("CH492").CopyBitmapToClipboard
PPSlide.Shapes.Paste
Set Sheet2= ActiveDocument.Sheets("SH04")
Set PPSlide = objPresentation.Slides.Add(objPresentation.Slides.Count + 1,11)
PPSlide.Shapes(1).TextFrame.TextRange.Text = "Perfeccionamiento"
Sheet2.GetSheetObject("CH37").CopyBitmapToClipboard
PPSlide.Shapes.Paste
Sheet2.GetSheetObject("CH38").CopyBitmapToClipboard
PPSlide.Shapes.Paste
Set PPSlide = Nothing
Set PPPres = Nothing
End sub
This is a good start. Now you need a loop that walks through all the sheets, activates one sheet at a time and calls this routine to perform the export.
Start from the method Sheets (in the APIGuide) and follow the chain of parents and children there.
cheers,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
This is a good start. Now you need a loop that walks through all the sheets, activates one sheet at a time and calls this routine to perform the export.
Start from the method Sheets (in the APIGuide) and follow the chain of parents and children there.
cheers,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
Thanks, just cost me a lot to understand how to do this. I have dealt with APIguide, but not me