Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to select multiple values in the single field
Example:
County
Japan
Singapore
Korea
China
Germany
USA
London
Brazil
Canada
I have to reduce the data and save the file only with Japan and China.
Another file will be USA,Canada.
Country is the field is linked with other tables. I would like to do this filtering only in the macro.
Thanks in Advance for your help.
sub JapanChina
ActiveDocument.Fields("Country").Select "(Japan|China)"
end sub
sub USACanada
ActiveDocument.Fields("Country").Select "(USA|Canada)"
end sub
I am not very clear about why you want to use macro.
Are these statdard groupings or random?
Do you want to manually reduce the files or thru publisher?
Why not create another field for these groupings and use that field for the reducing of the files?
Hi,
First am not sure the explanation is clear.
If you wish to reduce and save a file containing information for a particular country, why not reduce in the script, just have a WHERE clause, i.e. WHERE Country ='Japan' OR Country ='China'...
Then STORE
Would Bookmark be another alternative?
Book mark and Where clause is not solve the problem.
I am looking for Macro to reduce the data .
sub JapanChina
ActiveDocument.Fields("Country").Select "(Japan|China)"
end sub
sub USACanada
ActiveDocument.Fields("Country").Select "(USA|Canada)"
end sub
Hi Jerry what if one of the fields has a space? i am struggling with one:
sub JapanSouthAmerica
ActiveDocument.Fields("Country").Select "(Japan|South America)"
end sub
Thanks,
An possibility would be to use multiple double-quotes like:
"(""Japan""|""South America"")"
or you used toggleselect:
ActiveDocument.Fields("Country").Select "Japan"
ActiveDocument.Fields("Country").ToggleSelect "South America"
- Marcus