Im trying to develop a quick macro to save each of 67 layers into separate PDF files. Take layer one, save to pdf, take layer 2, save to pdf etc..
I took the code directly from the book, what else needs to be added or changed so it only saves one layer instead of all 67?
Sub Main ()
Dim objPDF as Object
Dim objPPRep as Object
Dim objPPApp as Object
Set objPPRep = CreateObject("CognosPowerPlay.Report"
objPPRep.Open( "c:\Cognos\repreport.ppr" )
objPPRep.Visible( TRUE )
Set objPDF = objPPRep.PDFFile( "c:\cognos\PDF-File" , True )
With objPDF
.SaveEntireReport = True
.SetListOfLayersToSave objPPRep.Layers
.SetListOfRowsToSave objPPRep.Rows
.SetChartToSave objPPRep.Graphs.Item(1)
.AxisOnAllPages = True
End With
objPDF.Save
set objPPRep = Nothing
Set objPDF = Nothing
End Sub
Thanks for any help anyone can give..
I took the code directly from the book, what else needs to be added or changed so it only saves one layer instead of all 67?
Sub Main ()
Dim objPDF as Object
Dim objPPRep as Object
Dim objPPApp as Object
Set objPPRep = CreateObject("CognosPowerPlay.Report"
objPPRep.Open( "c:\Cognos\repreport.ppr" )
objPPRep.Visible( TRUE )
Set objPDF = objPPRep.PDFFile( "c:\cognos\PDF-File" , True )
With objPDF
.SaveEntireReport = True
.SetListOfLayersToSave objPPRep.Layers
.SetListOfRowsToSave objPPRep.Rows
.SetChartToSave objPPRep.Graphs.Item(1)
.AxisOnAllPages = True
End With
objPDF.Save
set objPPRep = Nothing
Set objPDF = Nothing
End Sub
Thanks for any help anyone can give..