Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the Report Editor window, there is a list of Available reports for the document and the user. Is there a way to pull the reports for either category by the value in the Id column into a macro without building a table in the backend and loading this data manually?
If so, can a macro example be posted. Thanks.
Hi
This is straight from the API guide:
sub reports
set reps = ActiveDocument.GetDocReports
for i = 0 to reps.Count-1
set rep = reps.Item(i)
msgbox(rep.Id)
next
end sub
Hope it helps
/Fredrik
Hi
This is straight from the API guide:
sub reports
set reps = ActiveDocument.GetDocReports
for i = 0 to reps.Count-1
set rep = reps.Item(i)
msgbox(rep.Id)
next
end sub
Hope it helps
/Fredrik
Thank you this was exactly what I was looking for to accomplish my task as coded below. Noticed that the Document reports and User reports are distinguished by a prefix (for example: Document\RP01) so had to strip it out.
sub reports
tempFolder = "U:\Transfer\"
set reps = ActiveDocument.GetDocReports
for i = 0 to reps.Count-1
set rep = reps.Item(i)
reportID = rep.Id
if InStr(reportID, "\") > 0 then
reportID = Mid(reportID, (InStr(reportID, "\")+1))
end if
reportName = rep.Name
reportFile = tempFolder & reportID & "_" & reportName & ".pdf"
printReportPDF reportID, reportFile
next
end sub