I have a macro that is used to burst a report into multiple PDF's and would like to know how to convert it to Excel, csv, or Text. Running BI 5.1.3.
I have tried the obvious and changed mydoc.ExportAsPDF to mydoc.ExportAsTxt, mydoc.ExportAsXLS and mydoc.ExportAscsv along with the proper extensions, but to no avail.
Any help would be greatly appreciated,
Sam
Code:
Sub DIV_XLS()
Dim mydoc As Document
Dim myrpt As Report
Dim myFilterVar As DocumentVariable
Dim intNumChoices As Integer
Dim i As Integer
Dim myFilterChoices As Variant
Dim strNextValue As String
Application.Interactive = False
Application.BreakOnVBAError = False
Set mydoc = Application.Documents(1)
Set myrpt = mydoc.Reports.Item(1)
Set myFilterVar = mydoc.DocumentVariables("vDivision")
intNumChoices = UBound(myFilterVar.Values(boUniqueValues))
myFilterChoices = myFilterVar.Values(boUniqueValues)
For i = 1 To intNumChoices
strNextValue = myFilterChoices(i)
myrpt.AddComplexFilter myFilterVar, "=<vDivision>=" & """" & strNextValue & """"
myrpt.ForceCompute
[COLOR=red] mydoc.ExportAsPDF ("C:\BURST_TEST\DIV_" & strNextValue & ".pdf") [/color]
Next i
End Sub
Any help would be greatly appreciated,
Sam