Prev: Runtime Error 509
Next: manipulating pdf files from vba
From: Laurel on 26 Jan 2006 16:19 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
From: Peter Jamieson on 26 Jan 2006 16:42 Already answered in a previous thead. Peter Jamieson "Laurel" <FakeMail(a)Hotmail.com> wrote in message news:%237GSx3rIGHA.2040(a)TK2MSFTNGP14.phx.gbl... > 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 > > >
From: Laurel on 26 Jan 2006 17:04 You responded to my question about which parameter pattern Word 10 follows, but you didn't tell me what to do about the fact that I still am not able to make a successfull call to OpenDataSource under Word 2003. Below I show what I have tried - following the pattern you suggested in 2003 for a similar problem under Office 2002. Can you see what I might be doing wrong here? Perhpas the last parameter should no longer be 8? "Peter Jamieson" <pjj(a)KillmapSpjjnet.demon.co.uk> wrote in message news:uTx$zFsIGHA.3728(a)tk2msftngp13.phx.gbl... > Already answered in a previous thead. > > Peter Jamieson > > "Laurel" <FakeMail(a)Hotmail.com> wrote in message > news:%237GSx3rIGHA.2040(a)TK2MSFTNGP14.phx.gbl... >> 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 >> >> >> > >
From: Peter Jamieson on 26 Jan 2006 21:23 I can't be sure with Powerbuilder but... In Word 2002/2003 there are 16 parameters. I think you need an extra couple of strings, i.e. I think you need ole_word_file.MailMerge.OpenDataSource(is_excel_doc,0,FALSE, FALSE,FALSE,FALSE,"","",FALSE,"","","Entire Spreadsheet","","",FALSE,8) (but actually I don't think the values of the first four booleans, if any, will make any difference). The two strings are there to hold an SQL statement that you don't need in this case. That should open the Excel file using DDE, which is the default method used in Word 2000 and which opens a copy of Excel. It would also be possible to use OLEDB, which is the default method in Word 2002/2003 and is not available in Word 2000, and which has other compatibility implications to do with the format of the data. Peter Jamieson "Laurel" <FakeMail(a)Hotmail.com> wrote in message news:OYQAFRsIGHA.2012(a)TK2MSFTNGP14.phx.gbl... > You responded to my question about which parameter pattern Word 10 > follows, but you didn't tell me what to do about the fact that I still am > not able to make a successfull call to OpenDataSource under Word 2003. > Below I show what I have tried - following the pattern you suggested in > 2003 for a similar problem under Office 2002. Can you see what I might be > doing wrong here? Perhpas the last parameter should no longer be 8? > > "Peter Jamieson" <pjj(a)KillmapSpjjnet.demon.co.uk> wrote in message > news:uTx$zFsIGHA.3728(a)tk2msftngp13.phx.gbl... >> Already answered in a previous thead. >> >> Peter Jamieson >> >> "Laurel" <FakeMail(a)Hotmail.com> wrote in message >> news:%237GSx3rIGHA.2040(a)TK2MSFTNGP14.phx.gbl... >>> 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 >>> >>> >>> >> >> > >
From: Laurel on 27 Jan 2006 11:45
I'm sorry, but I can't tell the difference between what you say I need and what I am doing. I show two exampels, the old one first, with 14 parameters, and the new one, with 16, which looks just like the one you give me. I got the second, one, with 16 parameters from an answer you gave in a 2003 posting. I wish this forum supported color so I could highlight what I'm talking about in my original posting. It sounds like you may not have scrolled down enough. You're pretty sure that 8 is the proper value for the last parameter for 11.0? The answer you gave was in response to 10.0. Bottom line - I'm already using what you suggest, and I get the error I show. Any other ideas? "Peter Jamieson" <pjj(a)KillmapSpjjnet.demon.co.uk> wrote in message news:O0PccjuIGHA.596(a)TK2MSFTNGP10.phx.gbl... >I can't be sure with Powerbuilder but... > > In Word 2002/2003 there are 16 parameters. I think you need an extra > couple of strings, i.e. > > I think you need > > ole_word_file.MailMerge.OpenDataSource(is_excel_doc,0,FALSE, > FALSE,FALSE,FALSE,"","",FALSE,"","","Entire Spreadsheet","","",FALSE,8) > > (but actually I don't think the values of the first four booleans, if any, > will make any difference). The two strings are there to hold an SQL > statement that you don't need in this case. > > That should open the Excel file using DDE, which is the default method > used in Word 2000 and which opens a copy of Excel. It would also be > possible to use OLEDB, which is the default method in Word 2002/2003 and > is not available in Word 2000, and which has other compatibility > implications to do with the format of the data. > > Peter Jamieson > > "Laurel" <FakeMail(a)Hotmail.com> wrote in message > news:OYQAFRsIGHA.2012(a)TK2MSFTNGP14.phx.gbl... >> You responded to my question about which parameter pattern Word 10 >> follows, but you didn't tell me what to do about the fact that I still am >> not able to make a successfull call to OpenDataSource under Word 2003. >> Below I show what I have tried - following the pattern you suggested in >> 2003 for a similar problem under Office 2002. Can you see what I might >> be doing wrong here? Perhpas the last parameter should no longer be 8? >> >> "Peter Jamieson" <pjj(a)KillmapSpjjnet.demon.co.uk> wrote in message >> news:uTx$zFsIGHA.3728(a)tk2msftngp13.phx.gbl... >>> Already answered in a previous thead. >>> >>> Peter Jamieson >>> >>> "Laurel" <FakeMail(a)Hotmail.com> wrote in message >>> news:%237GSx3rIGHA.2040(a)TK2MSFTNGP14.phx.gbl... >>>> 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 >>>> >>>> >>>> >>> >>> >> >> > > |