Discussion Board for collaboration related to QlikView App Development.
I wrote a macro (VBS) to print a report to PDF and then mail it.
I need to loop through a field to generate a PDF report for each value and then get the email address associated (ie, the possible selection on the email field).
The code I wrote doesn't work as sometimes the current selections change when I try to get the possible values for the second field!
Can anyone point me in the right direction? thanks!
The same problem is already described in this post of 2010 (not answered)
Loop through multiple listBox selections and export to Excel
I'm sending a piece of the code I wrote below.
for i = 0 to mySelections.Count - 1
FieldValue = mySelections.Item(i).text
Print_PDF FieldValue, reportName, in_ReportID, reportPath
' here is the line where the field selection changes
set thisEmailSelection = ActiveDocument.Fields(EmailFieldName).GetPossibleValues(1)
If thisEmailSelection.Count = 1 Then
set mySelections = Nothing
Perhaps this thread can shade som light on your issue:
Printing PDF's with a loop