OpenDataSource fails

L

Laurel

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_doc,0,FALSE,TRUE,FALSE,FALSE,"","",FALSE,"","","Entire
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_doc,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
 
P

Peter Jamieson

Please continue this as necessary in the microsoft.public.word.vba.general
newsgroup.

Peter Jamieson
 
L

Laurel

OK, have reposted in that forum. Since you were actually the person who
responded to the posting in 2003 that led me here, perhaps you could take a
look?
The subject is
"OpenDataSource Fails - Reposted from another forum"
tia
las


Peter Jamieson said:
Please continue this as necessary in the microsoft.public.word.vba.general
newsgroup.

Peter Jamieson

Laurel said:
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_doc,0,FALSE,TRUE,FALSE,FALSE,"","",FALSE,"","","Entire
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_doc,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
 
P

Peter Jamieson

I already did, I think.

Peter Jamieson


Laurel said:
OK, have reposted in that forum. Since you were actually the person who
responded to the posting in 2003 that led me here, perhaps you could take
a look?
The subject is
"OpenDataSource Fails - Reposted from another forum"
tia
las


Peter Jamieson said:
Please continue this as necessary in the
microsoft.public.word.vba.general newsgroup.

Peter Jamieson

Laurel said:
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_doc,0,FALSE,TRUE,FALSE,FALSE,"","",FALSE,"","","Entire
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_doc,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
 

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