Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using this macro to export QlikView charts to a PowerPoint document.
Sub pptTRNN'An array with the objects you want to export to powerpointDim myArray(21)myArray(0) = "CH1424"myArray(1) = "CH1465"myArray(2) = "CH1428"myArray(3) = "CH1430"myArray(4) = "CH1416"myArray(5) = "CH1414"myArray(6) = "CH1412"myArray(7) = "CH1410"myArray(8) = "CH1408"myArray(9) = "CH1406"myArray(10) = "CH1404"myArray(11) = "CH1402"myArray(12) = "CH1400"myArray(13) = "CH1398"myArray(14) = "CH1396"myArray(15) = "CH1394"myArray(16) = "CH1392"myArray(17) = "CH1390"myArray(18) = "CH1388"myArray(19) = "CH3470"myArray(20) = "CH1386"myArray(21) = "CH1432"'Create ppt objectSet PPApp = CreateObject("PowerPoint.Application")PPApp.Visible = TrueSet objPresentation = PPApp.Presentations.Add'Apply a template if you want one'objPresentation.ApplyTemplate _' ("C:\mytemplate.potx")'For each object in the array create a new slide and paste it. For each item in myArraySet PPSlide = objPresentation.Slides.Add(1,11)Set v=ActiveDocument.GetVariable("PRINT")v.SetContent "Y",trueActiveDocument.GetSheetObject(item).restoreActiveDocument.GetApplication.WaitForIdleActiveDocument.GetSheetObject(item).CopyBitMapToClipboardActiveDocument.GetSheetObject(item).minimizev.SetContent "N",truePPSlide.Shapes.PasteNext'Clean upSet PPSlide = NothingSet PPPres = NothingSet PPApp = NothingEnd Sub
It works great but now the user wants to add a title. I have this expresssion I would like to use.
If(len(vCustomerName)-0,
if(isnull([Customer Name]),
if(isnull([Agent Name Current]),' ',
[Agent Name Current]),[Customer Name]),vCustomerName)
I would like to know how to code this into the above macro.