Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
thierrytt1102
Partner - Creator II
Partner - Creator II

Selected multiples values using macro

Dear,

I'd like to select 2 years using a macro.

This works for only 1 year :

ActiveDocument.GetField("Year").Select  "2015"

How can I do for 2 values? 

ActiveDocument.GetField("Year").Select  "2015", "2016"  -> doesn't work

Thank you for your help

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Thierrytt,

Try,

ActiveDocument.Fields("Year").Select ("(2015|2016)")

View solution in original post

5 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Maybe you can apply this example:Select multiple values from a Field

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

Thanks but it's not exactly what I want, I'd like to have the possibility to select text values and not only numbers as "Year"

Kushal_Chawda

Why you are using macro? Can you tell us exactly what you want to do? I think it is possible by triggers.

See this

Macros are Bad

tamilarasu
Champion
Champion

Hi Thierrytt,

Try,

ActiveDocument.Fields("Year").Select ("(2015|2016)")

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

because it's part a pdf printing module using macro