Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this VBA script that send emails with data from QlikView for every selection in the Listbox separately. I need some help to insert the data that i selected in the listbox in the subject of the email.
objMsg.Subject = "Daily Mail and Inbound Calls Report" &" "& Date-1
The ObjectID for the Listbox is LB26
Thanks.
If there will be only one selected value:
set val=ActiveDocument.Fields("Month").GetSelectedValues
strSelection = val.Item(0).Text
.
.
objMsg.Subject = strSelection
It doesn't matter what the listbox ID is. The code relies on the selections in the field:
set val=ActiveDocument.Fields("Month").GetSelectedValues
for i=0 to val.Count-1
if val.Item(i).IsNumeric then
msgbox(val.Item(i).Number)
else
msgbox(val.Item(i).Text)
end if
next
Thanks for your answer but i don't know how to mount it in objMsg.Subject
If there will be only one selected value:
set val=ActiveDocument.Fields("Month").GetSelectedValues
strSelection = val.Item(0).Text
.
.
objMsg.Subject = strSelection