Error calling external object function...

I have an application that connects to MS Word to create some cover
letters that has been working fine.  The program recently began crashing
with the error message: PowerBuilder Application Execution Error (R0035)
                                 Application terminated.
                                 Error: Error calling external object
function open at line 302 in function
                                            wf_run_qpr of object
w_main_frame.
The code is:

OLEObject qpdr_doc
qpdr_doc = CREATE oleObject
result = qpdr_doc.connecttonewobject("word.application")
if result <> 0 then
  destroy qpdr_doc
  Messagebox("connect to new object","result = " + string(result))
  return false
end if
qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes here

Thanks for any help that can be provided.

Jerry



0
Jerry
1/29/2002 11:08:40 PM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

6 Replies
13548 Views

Similar Articles

[PageSpeed] 27

Any recent changes? If this was working fine until recently, something must
have changed.

/ck

"Jerry" <jerry.baltes@mgadvisors.com> wrote in message
news:DxUvsqRqBHA.52@forums.sybase.com...
> I have an application that connects to MS Word to create some cover
> letters that has been working fine.  The program recently began crashing
> with the error message: PowerBuilder Application Execution Error (R0035)
>                                  Application terminated.
>                                  Error: Error calling external object
> function open at line 302 in function
>                                             wf_run_qpr of object
> w_main_frame.
> The code is:
>
> OLEObject qpdr_doc
> qpdr_doc = CREATE oleObject
> result = qpdr_doc.connecttonewobject("word.application")
> if result <> 0 then
>   destroy qpdr_doc
>   Messagebox("connect to new object","result = " + string(result))
>   return false
> end if
> qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes here
>
> Thanks for any help that can be provided.
>
> Jerry
>
>
>


0
Chris
1/29/2002 11:23:19 PM
The only thing I changed recently was a logo (.bmp file) on a datawindow
to a different .bmp file, but no changes were made related to the code that
connects to Word!
I've even tried running an old .exe compiled over a year ago that used to
work,
but gets the same error.


"Chris Keating" <keating@iAnywhereSolutions.com> wrote in message
news:23cZ3yRqBHA.286@forums.sybase.com...
> Any recent changes? If this was working fine until recently, something
must
> have changed.
>
> /ck
>
> "Jerry" <jerry.baltes@mgadvisors.com> wrote in message
> news:DxUvsqRqBHA.52@forums.sybase.com...
> > I have an application that connects to MS Word to create some cover
> > letters that has been working fine.  The program recently began crashing
> > with the error message: PowerBuilder Application Execution Error (R0035)
> >                                  Application terminated.
> >                                  Error: Error calling external object
> > function open at line 302 in function
> >                                             wf_run_qpr of object
> > w_main_frame.
> > The code is:
> >
> > OLEObject qpdr_doc
> > qpdr_doc = CREATE oleObject
> > result = qpdr_doc.connecttonewobject("word.application")
> > if result <> 0 then
> >   destroy qpdr_doc
> >   Messagebox("connect to new object","result = " + string(result))
> >   return false
> > end if
> > qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes here
> >
> > Thanks for any help that can be provided.
> >
> > Jerry
> >
> >
> >
>
>


0
Jerry
1/29/2002 11:32:29 PM
From what I've been able to dig up on this error, it will occur in the exact
situation you describe if the document can't be opened or doesn't exist.

Has any of the following conditions RECENTLY become true;

1) the file attributes set to read-only, system or hidden.
2) a space now in some portion of the pathname.
3) a portion of the pathname (between backslashes) now longer than 8
characters.

Also, have you gone through the debugger to make sure the string holding the
path and filename are correct?

You might want to do a search on www.google.com for the string "Error
calling external object function open at line".

HTH

-EGM

Jerry <jerry.baltes@mgadvisors.com> wrote in message
news:I$dr$3RqBHA.206@forums.sybase.com...
> The only thing I changed recently was a logo (.bmp file) on a datawindow
> to a different .bmp file, but no changes were made related to the code
that
> connects to Word!
> I've even tried running an old .exe compiled over a year ago that used to
> work,
> but gets the same error.
>
>
> "Chris Keating" <keating@iAnywhereSolutions.com> wrote in message
> news:23cZ3yRqBHA.286@forums.sybase.com...
> > Any recent changes? If this was working fine until recently, something
> must
> > have changed.
> >
> > /ck
> >
> > "Jerry" <jerry.baltes@mgadvisors.com> wrote in message
> > news:DxUvsqRqBHA.52@forums.sybase.com...
> > > I have an application that connects to MS Word to create some cover
> > > letters that has been working fine.  The program recently began
crashing
> > > with the error message: PowerBuilder Application Execution Error
(R0035)
> > >                                  Application terminated.
> > >                                  Error: Error calling external object
> > > function open at line 302 in function
> > >                                             wf_run_qpr of object
> > > w_main_frame.
> > > The code is:
> > >
> > > OLEObject qpdr_doc
> > > qpdr_doc = CREATE oleObject
> > > result = qpdr_doc.connecttonewobject("word.application")
> > > if result <> 0 then
> > >   destroy qpdr_doc
> > >   Messagebox("connect to new object","result = " + string(result))
> > >   return false
> > > end if
> > > qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes here
> > >
> > > Thanks for any help that can be provided.
> > >
> > > Jerry
> > >
> > >
> > >
> >
> >
>
>


0
Edward
1/30/2002 12:02:34 AM
Can you go into Word and open up the file that is specified in ls_filename
without incident?

If so, you might try rebooting the machine if you haven't done so recently.
My experience is that Word can suck up a lot of memory that it doesn't
necessarily return when done.  The machine that we have to does lots of
automated printing is rebooted each and every day.

"Jerry" <jerry.baltes@mgadvisors.com> wrote in message
news:DxUvsqRqBHA.52@forums.sybase.com...
> I have an application that connects to MS Word to create some cover
> letters that has been working fine.  The program recently began crashing
> with the error message: PowerBuilder Application Execution Error (R0035)
>                                  Application terminated.
>                                  Error: Error calling external object
> function open at line 302 in function
>                                             wf_run_qpr of object
> w_main_frame.
> The code is:
>
> OLEObject qpdr_doc
> qpdr_doc = CREATE oleObject
> result = qpdr_doc.connecttonewobject("word.application")
> if result <> 0 then
>   destroy qpdr_doc
>   Messagebox("connect to new object","result = " + string(result))
>   return false
> end if
> qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes here
>
> Thanks for any help that can be provided.
>
> Jerry
>
>
>


0
Mark
1/30/2002 12:21:48 AM
The program is using the filename without a path - eg. "filename.doc"
and assumed the file was in the same directory as the .exe but when I hard
coded ls_filename to be "C:\filename.doc" and copied the file from the
network to my local drive, it worked.
So apparently it has something to do with the path to the network.


"Edward Muesch" <emuesch@hotmail.com> wrote in message
news:rxm0eJSqBHA.204@forums.sybase.com...
> From what I've been able to dig up on this error, it will occur in the
exact
> situation you describe if the document can't be opened or doesn't exist.
>
> Has any of the following conditions RECENTLY become true;
>
> 1) the file attributes set to read-only, system or hidden.
> 2) a space now in some portion of the pathname.
> 3) a portion of the pathname (between backslashes) now longer than 8
> characters.
>
> Also, have you gone through the debugger to make sure the string holding
the
> path and filename are correct?
>
> You might want to do a search on www.google.com for the string "Error
> calling external object function open at line".
>
> HTH
>
> -EGM
>
> Jerry <jerry.baltes@mgadvisors.com> wrote in message
> news:I$dr$3RqBHA.206@forums.sybase.com...
> > The only thing I changed recently was a logo (.bmp file) on a datawindow
> > to a different .bmp file, but no changes were made related to the code
> that
> > connects to Word!
> > I've even tried running an old .exe compiled over a year ago that used
to
> > work,
> > but gets the same error.
> >
> >
> > "Chris Keating" <keating@iAnywhereSolutions.com> wrote in message
> > news:23cZ3yRqBHA.286@forums.sybase.com...
> > > Any recent changes? If this was working fine until recently, something
> > must
> > > have changed.
> > >
> > > /ck
> > >
> > > "Jerry" <jerry.baltes@mgadvisors.com> wrote in message
> > > news:DxUvsqRqBHA.52@forums.sybase.com...
> > > > I have an application that connects to MS Word to create some cover
> > > > letters that has been working fine.  The program recently began
> crashing
> > > > with the error message: PowerBuilder Application Execution Error
> (R0035)
> > > >                                  Application terminated.
> > > >                                  Error: Error calling external
object
> > > > function open at line 302 in function
> > > >                                             wf_run_qpr of object
> > > > w_main_frame.
> > > > The code is:
> > > >
> > > > OLEObject qpdr_doc
> > > > qpdr_doc = CREATE oleObject
> > > > result = qpdr_doc.connecttonewobject("word.application")
> > > > if result <> 0 then
> > > >   destroy qpdr_doc
> > > >   Messagebox("connect to new object","result = " + string(result))
> > > >   return false
> > > > end if
> > > > qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes
here
> > > >
> > > > Thanks for any help that can be provided.
> > > >
> > > > Jerry
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Jerry
1/30/2002 12:32:39 AM
To save yourself from this problem again, try using FileExists( ) to verify
that the file can be located. If not found, you can provide a far more clear
error than what you get otherwise.

Just a thought....

/ck

"Jerry" <jerry.baltes@mgadvisors.com> wrote in message
news:tpb#nZSqBHA.286@forums.sybase.com...
> The program is using the filename without a path - eg. "filename.doc"
> and assumed the file was in the same directory as the .exe but when I hard
> coded ls_filename to be "C:\filename.doc" and copied the file from the
> network to my local drive, it worked.
> So apparently it has something to do with the path to the network.
>
>
> "Edward Muesch" <emuesch@hotmail.com> wrote in message
> news:rxm0eJSqBHA.204@forums.sybase.com...
> > From what I've been able to dig up on this error, it will occur in the
> exact
> > situation you describe if the document can't be opened or doesn't exist.
> >
> > Has any of the following conditions RECENTLY become true;
> >
> > 1) the file attributes set to read-only, system or hidden.
> > 2) a space now in some portion of the pathname.
> > 3) a portion of the pathname (between backslashes) now longer than 8
> > characters.
> >
> > Also, have you gone through the debugger to make sure the string holding
> the
> > path and filename are correct?
> >
> > You might want to do a search on www.google.com for the string "Error
> > calling external object function open at line".
> >
> > HTH
> >
> > -EGM
> >
> > Jerry <jerry.baltes@mgadvisors.com> wrote in message
> > news:I$dr$3RqBHA.206@forums.sybase.com...
> > > The only thing I changed recently was a logo (.bmp file) on a
datawindow
> > > to a different .bmp file, but no changes were made related to the code
> > that
> > > connects to Word!
> > > I've even tried running an old .exe compiled over a year ago that used
> to
> > > work,
> > > but gets the same error.
> > >
> > >
> > > "Chris Keating" <keating@iAnywhereSolutions.com> wrote in message
> > > news:23cZ3yRqBHA.286@forums.sybase.com...
> > > > Any recent changes? If this was working fine until recently,
something
> > > must
> > > > have changed.
> > > >
> > > > /ck
> > > >
> > > > "Jerry" <jerry.baltes@mgadvisors.com> wrote in message
> > > > news:DxUvsqRqBHA.52@forums.sybase.com...
> > > > > I have an application that connects to MS Word to create some
cover
> > > > > letters that has been working fine.  The program recently began
> > crashing
> > > > > with the error message: PowerBuilder Application Execution Error
> > (R0035)
> > > > >                                  Application terminated.
> > > > >                                  Error: Error calling external
> object
> > > > > function open at line 302 in function
> > > > >                                             wf_run_qpr of object
> > > > > w_main_frame.
> > > > > The code is:
> > > > >
> > > > > OLEObject qpdr_doc
> > > > > qpdr_doc = CREATE oleObject
> > > > > result = qpdr_doc.connecttonewobject("word.application")
> > > > > if result <> 0 then
> > > > >   destroy qpdr_doc
> > > > >   Messagebox("connect to new object","result = " + string(result))
> > > > >   return false
> > > > > end if
> > > > > qpdr_doc.Documents.open(ls_filename)  <---------  Program crashes
> here
> > > > >
> > > > > Thanks for any help that can be provided.
> > > > >
> > > > > Jerry
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Chris
1/30/2002 1:21:11 AM
Reply:

Web resources about - Error calling external object function... - sybase.powerbuilder.general

Externals - Wikipedia, the free encyclopedia
All of the Externals were originally portrayed as immortal and important, playing an extremely major role in the future and Apocalypse 's rise ...


BuzzFeed Tries Out an External Banner Ad
... the NBCUniversal streaming comedy service Seeso, over the weekend. The digital media site has long favored custom-made native ads over external ...

ASUS Booth Tour at CES 2016: 10G Switches, External GPU Dock, USB-C Monitor and more
When ASUS emailed a couple of weeks before CES announcing that they had cancelled their press event for the show, we had a few question marks. ...

AMD XConnect wants to make external GPUs easier to use
AMD has introduced XConnect, a form of driver-level support for external graphics cards, as part of its latest Radeon 16.3 driver. XConnect allows ...

Xiaomi's new Mi Powerbank Pro is a 10,000 mAh external battery with USB Type-C
... LG's G5 and Xiaomi's Mi 5 unveiled with USB Type-C. But, for consumers, having it on a new smartphone may actually be an issue. An external ...

Three external hard drives up to 5TB are on sale at deep discounts on Amazon
... it's always worth considering. Well wouldn't you know it, Amazon is currently offering bigger-than-normal discounts on three different external ...

Crisis management: 70% internal, 30% external
... the importance of that early experience. Today when I talk with executives about crisis management, their focus is almost exclusively external. ...

Gamers rejoice! AMD releases Thunderbolt 3 driver for external video cards
AMD has issued a driver update that will allow ultrathin notebooks or 2-in-1 laptops to connect via Thunderbolt 3 to external GPU enclosures ...

Merkel on refugee crisis: ‘We need protection of external borders’
“It is good if EU and Turkey share the burden, but we need protection of external borders,” said German Chancellor Angela Merkel on her arrival ...

Resources last updated: 3/11/2016 2:23:29 PM