View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Laurel
 
Posts: n/a
Default OpenDataSource fails

In a PowerBuilder script, this line of code works fine in Word 9.0 (Office
2000). But it fails in Word 11.0 (Office 2003).

ole_word_file.MailMerge.OpenDataSource(is_excel_do c,0,FALSE,TRUE,FALSE,FALSE,"","",FALSE,"","","Enti re
Spreadsheet")

The error is "Error 35 - Error calling external object function
OpenDataSource at line 52"

Two new parameters have been added in Word 11, [I found a 2003 thread in
this forum which suggesteed that the values should be as follows. This does
not work for me, but I'm working with Word 11, and the author of the 2003
thread was working with "Word 2002" - probably Office 2002? - don't know
what version, but probably 10. Should I be entering a different constant
value for the last parameter?

ole_word_file.MailMerge.OpenDataSource(is_excel_do c,0,FALSE,
TRUE,FALSE,FALSE,"","",FALSE,"","","Entire
Spreadsheet",FALSE,8)

Note that I have no experience working with OLE, so please use "for dummies"
language when responding.

TIA
LAS