Microsoft word Database quick part - How to use a mergefield as a filter for the database query -


i using mail merge input data excel sheet. everthing works great , can access variables using «mymergefield»

now need each letter generated excel file , query take «mymergefield» query filter select x field1 = «mymergefield»

the way proceeding "inserting quick part" => "field" in word document. in quickpart dialog, choose "database", choose excel file.

once data source chosen, there option change request parameters, click on , filter configuration popup can choose field (from excel sheet), operator ("equals" in case). there's compare field. in case not simple comparing string. comparing mail merge field.

i tried following syntax:

«myfield»

mergefield myfield

mergefield "myfield"

{mergefield myfield}

{ mergefield myfield}

none worked, complained did not find match did not insert database (of course not find match syntax if don't run mail merge)

i did directly in openxml file of existing example (because can't edit existing quickpart - correct me if im wrong) , database query looked like:

from `candidates$` ((`column` = '</w:instrtext> ... <w:instrtext xml:space="preserve"> mergefield myfield</w:instrtext> </w:r> 

any ideas? thank you!


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -