OpenDataSource + Statement option

Joined
Jan 21, 2016
Messages
4
Reaction score
0
Hello,

please, does anyone know how to continue with this Word VBA command in complience with this image?
upload_2016-1-31_14-44-11.png


I would like to connect with Excel Workbook Name: SEZNAM.XLS, Sheet Name: "Soukromé osoby" and also set up merge filter filed name = "jméno_1" is not empty > is not null...

My command (DDE connection must be) is: ActiveDocument.MailMerge.OpenDataSource Name:=ThisDocument.Path & "\SEZNAM.XLS", SQLStatement:="SELECT * FROM [Soukromé osoby]", SubType:=wdMergeSubTypeWord2000
It's ok but after that I recieve this dialog (sorry in Czech) > Cell contents or named are: must be "Celý list" (Whole Sheet)
upload_2016-1-31_14-49-32.png


My next attempt of command was not successful: ActiveDocument.MailMerge.OpenDataSource Name:=ThisDocument.Path & "\SEZNAM.XLS", SQLStatement:="SELECT * FROM [Soukromé osoby]" & "WHERE [jméno_1] = _NULL", SubType:=wdMergeSubTypeWord2000
There is no named area "Celý sešit"....


Please, please help

Thanks so much in advance.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top