Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()

5 posts in ,  PowerscriptObjects General Discussion Last posting was on 2007-02-06 13:45:43.0Z
pleaselogin Posted on 2007-02-02 19:10:58.0Z
From: "pleaselogin" <pleaselogin@gmail.com>
Newsgroups: sybase.public.powerbuilder.general,sybase.public.powerbuilder.powerscript,sybase.public.powerbuilder.objects
Subject: PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()
Date: 2 Feb 2007 11:10:58 -0800
Organization: http://groups.google.com
Lines: 89
Message-ID: <1170443458.355019.286800@m58g2000cwm.googlegroups.com>
NNTP-Posting-Host: 205.200.189.2
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1170443463 11467 127.0.0.1 (2 Feb 2007 19:11:03 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 2 Feb 2007 19:11:03 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 WPG001NS4
Complaints-To: groups-abuse@google.com
Injection-Info: m58g2000cwm.googlegroups.com; posting-host=205.200.189.2; posting-account=GAdQSw0AAADyz5dqZix8SZDhfg0Yg5IK
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!m58g2000cwm.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:201051 sybase.public.powerbuilder.powerscript:25059 sybase.public.powerbuilder.objects:9229
Article PK: 651917

I've successfully added MS Word spellchecking to my application. It
works exactly as we need it to...

... except with the following problem!

When a user starts spellchecking (in that, I mean MS Word's spell
check dialog box is open) and the user leaves the application, after
about 20 minutes, the app spits out the following error msg:

Error Number 39
Error Text = Error accessing external object property checkspelling at
line 32 in function blah() of object n_blah.

However, if the user mimics the identical process, but does not stop
until the spell check is over, it works 100%.

We are not running any Timer() event or script. This problem also
happens in another application that we've built!

Any suggestions?

Here's my code:

any la_getback
string ls_holdtext
n_cst_conversion lnv_conversion

SetPointer(HourGlass!)

//Perform any pre-spellcheck functionality
gnv_App.EVENT ue_prespellcheck()

IF inv_ole.ConnectToNewObject("word.application") <> 0 THEN
gnv_App.inv_error.of_Message("pfc_systemerror", &
{"CCAIN could not connect to MS Word. Please contact Systems
Support."})
RETURN FAILURE
END IF

inv_ole.Application.Visible = TRUE
inv_ole.Application.WindowState = ii_WordWindowState

inv_ole.Documents.Add
inv_ole.ActiveDocument.Activate
inv_ole.ActiveDocument.Range(0,0).InsertAfter(aa_text)

//Check based on desired style
CHOOSE CASE ii_style
CASE SPELL_GRAMMER
inv_ole.ActiveDocument.CheckGrammar <<<<<<<<<<<<<-----------It's
puking right here, and
CASE SPELLONLY
inv_ole.ActiveDocument.CheckSpelling <<<<<<<<<<<<<-----------It's
puking right here, depending which spellcheck you want to do
END CHOOSE

inv_ole.selection.wholestory()

//get the results of the spellchecker back
la_getback = inv_ole.selection.text

//identify the type of data returned. Data returned may be string,
numeric, or date
//Find out which one it was and then assign it to a string
CHOOSE CASE classname(la_getback)
CASE "boolean"
ls_holdtext = lnv_conversion.of_String(la_getback, 'TRUEFALSE')

CASE "integer", "long", "float", "double", "decimal", "time", "date",
"datetime"
ls_holdtext = string(la_getback)

CASE "string"
ls_holdtext = la_getback

END CHOOSE

IF ls_holdtext <> aa_text THEN aa_text = Mid(ls_holdtext, 1,
len(ls_holdtext) - 1)

inv_ole.ActiveDocument.Saved=TRUE
inv_ole.ActiveDocument.Close
inv_ole.Application.Quit(0, 1, FALSE) //quit, and don't save changes

//Perform any post-spellcheck functionality
gnv_App.EVENT ue_postspellcheck()

RETURN SUCCESS


pleaselogin Posted on 2007-02-06 13:44:36.0Z
From: "pleaselogin" <pleaselogin@gmail.com>
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()
Date: 6 Feb 2007 05:44:36 -0800
Organization: http://groups.google.com
Lines: 100
Message-ID: <1170769476.822627.312920@v45g2000cwv.googlegroups.com>
References: <1170443458.355019.286800@m58g2000cwm.googlegroups.com>
NNTP-Posting-Host: 205.200.189.2
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1170769484 9740 127.0.0.1 (6 Feb 2007 13:44:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Feb 2007 13:44:44 +0000 (UTC)
In-Reply-To: <1170443458.355019.286800@m58g2000cwm.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 WPG001NS4
Complaints-To: groups-abuse@google.com
Injection-Info: v45g2000cwv.googlegroups.com; posting-host=205.200.189.2; posting-account=GAdQSw0AAADyz5dqZix8SZDhfg0Yg5IK
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!v45g2000cwv.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:201149
Article PK: 652002

Never mind. I figured it out.

To whoever is interested, use inv_ole.SetAutomationTimeout(). This
sets the interval time that Word remains the OLE server to your PB
app.

Thanks

On Feb 2, 1:10 pm, "pleaselogin" <pleaselo...@gmail.com> wrote:
> I've successfully added MS Word spellchecking to my application. It
> works exactly as we need it to...
>
> ... except with the following problem!
>
> When a user starts spellchecking (in that, I mean MS Word's spell
> check dialog box is open) and the user leaves the application, after
> about 20 minutes, the app spits out the following error msg:
>
> Error Number 39
> Error Text = Error accessing external object property checkspelling at
> line 32 in function blah() of object n_blah.
>
> However, if the user mimics the identical process, but does not stop
> until the spell check is over, it works 100%.
>
> We are not running any Timer() event or script. This problem also
> happens in another application that we've built!
>
> Any suggestions?
>
> Here's my code:
>
> any la_getback
> string ls_holdtext
> n_cst_conversion lnv_conversion
>
> SetPointer(HourGlass!)
>
> //Perform any pre-spellcheck functionality
> gnv_App.EVENT ue_prespellcheck()
>
> IF inv_ole.ConnectToNewObject("word.application") <> 0 THEN
> gnv_App.inv_error.of_Message("pfc_systemerror", &
> {"CCAIN could not connect to MS Word. Please contact Systems
> Support."})
> RETURN FAILURE
> END IF
>
> inv_ole.Application.Visible = TRUE
> inv_ole.Application.WindowState = ii_WordWindowState
>
> inv_ole.Documents.Add
> inv_ole.ActiveDocument.Activate
> inv_ole.ActiveDocument.Range(0,0).InsertAfter(aa_text)
>
> //Check based on desired style
> CHOOSE CASE ii_style
> CASE SPELL_GRAMMER
> inv_ole.ActiveDocument.CheckGrammar <<<<<<<<<<<<<-----------It's
> puking right here, and
> CASE SPELLONLY
> inv_ole.ActiveDocument.CheckSpelling <<<<<<<<<<<<<-----------It's
> puking right here, depending which spellcheck you want to do
> END CHOOSE
>
> inv_ole.selection.wholestory()
>
> //get the results of the spellchecker back
> la_getback = inv_ole.selection.text
>
> //identify the type of data returned. Data returned may be string,
> numeric, or date
> //Find out which one it was and then assign it to a string
> CHOOSE CASE classname(la_getback)
> CASE "boolean"
> ls_holdtext = lnv_conversion.of_String(la_getback, 'TRUEFALSE')
>
> CASE "integer", "long", "float", "double", "decimal", "time", "date",
> "datetime"
> ls_holdtext = string(la_getback)
>
> CASE "string"
> ls_holdtext = la_getback
>
> END CHOOSE
>
> IF ls_holdtext <> aa_text THEN aa_text = Mid(ls_holdtext, 1,
> len(ls_holdtext) - 1)
>
> inv_ole.ActiveDocument.Saved=TRUE
> inv_ole.ActiveDocument.Close
> inv_ole.Application.Quit(0, 1, FALSE) //quit, and don't save changes
>
> //Perform any post-spellcheck functionality
> gnv_App.EVENT ue_postspellcheck()
>
> RETURN SUCCESS


pleaselogin Posted on 2007-02-06 13:45:43.0Z
From: "pleaselogin" <pleaselogin@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()
Date: 6 Feb 2007 05:45:43 -0800
Organization: http://groups.google.com
Lines: 99
Message-ID: <1170769543.199878.240620@l53g2000cwa.googlegroups.com>
References: <1170443458.355019.286800@m58g2000cwm.googlegroups.com>
NNTP-Posting-Host: 205.200.189.2
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1170769548 10010 127.0.0.1 (6 Feb 2007 13:45:48 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Feb 2007 13:45:48 +0000 (UTC)
In-Reply-To: <1170443458.355019.286800@m58g2000cwm.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 WPG001NS4
Complaints-To: groups-abuse@google.com
Injection-Info: l53g2000cwa.googlegroups.com; posting-host=205.200.189.2; posting-account=GAdQSw0AAADyz5dqZix8SZDhfg0Yg5IK
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!l53g2000cwa.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9232
Article PK: 736399

Never mind. I figured it out.

To whoever is interested, use inv_ole.SetAutomationTimeout(). This
sets the interval time that Word remains the OLE server to your PB
app.

Thanks

On Feb 2, 1:10 pm, "pleaselogin" <pleaselo...@gmail.com> wrote:
> I've successfully added MS Word spellchecking to my application. It
> works exactly as we need it to...
>
> ... except with the following problem!
>
> When a user starts spellchecking (in that, I mean MS Word's spell
> check dialog box is open) and the user leaves the application, after
> about 20 minutes, the app spits out the following error msg:
>
> Error Number 39
> Error Text = Error accessing external object property checkspelling at
> line 32 in function blah() of object n_blah.
>
> However, if the user mimics the identical process, but does not stop
> until the spell check is over, it works 100%.
>
> We are not running any Timer() event or script. This problem also
> happens in another application that we've built!
>
> Any suggestions?
>
> Here's my code:
>
> any la_getback
> string ls_holdtext
> n_cst_conversion lnv_conversion
>
> SetPointer(HourGlass!)
>
> //Perform any pre-spellcheck functionality
> gnv_App.EVENT ue_prespellcheck()
>
> IF inv_ole.ConnectToNewObject("word.application") <> 0 THEN
> gnv_App.inv_error.of_Message("pfc_systemerror", &
> {"CCAIN could not connect to MS Word. Please contact Systems
> Support."})
> RETURN FAILURE
> END IF
>
> inv_ole.Application.Visible = TRUE
> inv_ole.Application.WindowState = ii_WordWindowState
>
> inv_ole.Documents.Add
> inv_ole.ActiveDocument.Activate
> inv_ole.ActiveDocument.Range(0,0).InsertAfter(aa_text)
>
> //Check based on desired style
> CHOOSE CASE ii_style
> CASE SPELL_GRAMMER
> inv_ole.ActiveDocument.CheckGrammar <<<<<<<<<<<<<-----------It's
> puking right here, and
> CASE SPELLONLY
> inv_ole.ActiveDocument.CheckSpelling <<<<<<<<<<<<<-----------It's
> puking right here, depending which spellcheck you want to do
> END CHOOSE
>
> inv_ole.selection.wholestory()
>
> //get the results of the spellchecker back
> la_getback = inv_ole.selection.text
>
> //identify the type of data returned. Data returned may be string,
> numeric, or date
> //Find out which one it was and then assign it to a string
> CHOOSE CASE classname(la_getback)
> CASE "boolean"
> ls_holdtext = lnv_conversion.of_String(la_getback, 'TRUEFALSE')
>
> CASE "integer", "long", "float", "double", "decimal", "time", "date",
> "datetime"
> ls_holdtext = string(la_getback)
>
> CASE "string"
> ls_holdtext = la_getback
>
> END CHOOSE
>
> IF ls_holdtext <> aa_text THEN aa_text = Mid(ls_holdtext, 1,
> len(ls_holdtext) - 1)
>
> inv_ole.ActiveDocument.Saved=TRUE
> inv_ole.ActiveDocument.Close
> inv_ole.Application.Quit(0, 1, FALSE) //quit, and don't save changes
>
> //Perform any post-spellcheck functionality
> gnv_App.EVENT ue_postspellcheck()
>
> RETURN SUCCESS


Mitch Posted on 2007-02-06 11:22:08.0Z
Sender: 5fbf.45c1eda9.1804289383@sybase.com
From: Mitch
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45c872f0.5c03.1681692777@sybase.com>
References: <1170443458.355019.286800@m58g2000cwm.googlegroups.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Feb 2007 04:22:08 -0700
X-Trace: forums-1-dub 1170764528 10.22.241.41 (6 Feb 2007 04:22:08 -0700)
X-Original-Trace: 6 Feb 2007 04:22:08 -0700, 10.22.241.41
Lines: 100
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:25064
Article PK: 791947

Word is timing out as an OLE server when the user doesn't
close the spell check - this will also leave an instance of
Word running. Use inv_Ole.SetAutomationTimeout(ll_Interval )

> I've successfully added MS Word spellchecking to my
> application. It works exactly as we need it to...
>
> ... except with the following problem!
>
> When a user starts spellchecking (in that, I mean MS
> Word's spell check dialog box is open) and the user leaves
> the application, after about 20 minutes, the app spits out
> the following error msg:
>
> Error Number 39
> Error Text = Error accessing external object property
> checkspelling at line 32 in function blah() of object
> n_blah.
>
> However, if the user mimics the identical process, but
> does not stop until the spell check is over, it works
> 100%.
>
> We are not running any Timer() event or script. This
> problem also happens in another application that we've
> built!
>
> Any suggestions?
>
> Here's my code:
>
> any la_getback
> string ls_holdtext
> n_cst_conversion lnv_conversion
>
> SetPointer(HourGlass!)
>
> //Perform any pre-spellcheck functionality
> gnv_App.EVENT ue_prespellcheck()
>
> IF inv_ole.ConnectToNewObject("word.application") <> 0
> THEN
> gnv_App.inv_error.of_Message("pfc_systemerror", &
> {"CCAIN could not connect to MS Word. Please
> contact Systems Support."})
> RETURN FAILURE
> END IF
>
> inv_ole.Application.Visible = TRUE
> inv_ole.Application.WindowState = ii_WordWindowState
>
> inv_ole.Documents.Add
> inv_ole.ActiveDocument.Activate
> inv_ole.ActiveDocument.Range(0,0).InsertAfter(aa_text)
>
> //Check based on desired style
> CHOOSE CASE ii_style
> CASE SPELL_GRAMMER
> inv_ole.ActiveDocument.CheckGrammar
> <<<<<<<<<<<<<-----------It's puking right here, and
> CASE SPELLONLY
> inv_ole.ActiveDocument.CheckSpelling
> <<<<<<<<<<<<<-----------It's puking right here, depending
> which spellcheck you want to do END CHOOSE
>
> inv_ole.selection.wholestory()
>
> //get the results of the spellchecker back
> la_getback = inv_ole.selection.text
>
> //identify the type of data returned. Data returned may be
> string, numeric, or date
> //Find out which one it was and then assign it to a string
> CHOOSE CASE classname(la_getback)
> CASE "boolean"
> ls_holdtext = lnv_conversion.of_String(la_getback,
> 'TRUEFALSE')
>
> CASE "integer", "long", "float", "double", "decimal",
> "time", "date", "datetime"
> ls_holdtext = string(la_getback)
>
> CASE "string"
> ls_holdtext = la_getback
>
> END CHOOSE
>
> IF ls_holdtext <> aa_text THEN aa_text = Mid(ls_holdtext,
> 1, len(ls_holdtext) - 1)
>
> inv_ole.ActiveDocument.Saved=TRUE
> inv_ole.ActiveDocument.Close
> inv_ole.Application.Quit(0, 1, FALSE) //quit, and don't
> save changes
>
> //Perform any post-spellcheck functionality
> gnv_App.EVENT ue_postspellcheck()
>
> RETURN SUCCESS
>


pleaselogin Posted on 2007-02-06 13:40:00.0Z
From: "pleaselogin" <pleaselogin@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()
Date: 6 Feb 2007 05:40:00 -0800
Organization: http://groups.google.com
Lines: 108
Message-ID: <1170769200.183742.222750@l53g2000cwa.googlegroups.com>
References: <1170443458.355019.286800@m58g2000cwm.googlegroups.com> <45c872f0.5c03.1681692777@sybase.com>
NNTP-Posting-Host: 205.200.189.2
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1170769212 9158 127.0.0.1 (6 Feb 2007 13:40:12 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Feb 2007 13:40:12 +0000 (UTC)
In-Reply-To: <45c872f0.5c03.1681692777@sybase.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 WPG001NS4
Complaints-To: groups-abuse@google.com
Injection-Info: l53g2000cwa.googlegroups.com; posting-host=205.200.189.2; posting-account=GAdQSw0AAADyz5dqZix8SZDhfg0Yg5IK
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!l53g2000cwa.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:25065
Article PK: 791951

Thanks.

I actually figured it out myself using SetAutomationTimeout().

Thank you anyway for the reply.

On Feb 6, 5:22 am, Mitch wrote:
> Word is timing out as an OLE server when the user doesn't
> close the spell check - this will also leave an instance of
> Word running. Use inv_Ole.SetAutomationTimeout(ll_Interval )
>
> > I've successfully added MS Word spellchecking to my
> > application. It works exactly as we need it to...
>
> > ... except with the following problem!
>
> > When a user starts spellchecking (in that, I mean MS
> > Word's spell check dialog box is open) and the user leaves
> > the application, after about 20 minutes, the app spits out
> > the following error msg:
>
> > Error Number 39
> > Error Text = Error accessing external object property
> > checkspelling at line 32 in function blah() of object
> > n_blah.
>
> > However, if the user mimics the identical process, but
> > does not stop until the spell check is over, it works
> > 100%.
>
> > We are not running any Timer() event or script. This
> > problem also happens in another application that we've
> > built!
>
> > Any suggestions?
>
> > Here's my code:
>
> > any la_getback
> > string ls_holdtext
> > n_cst_conversion lnv_conversion
>
> > SetPointer(HourGlass!)
>
> > //Perform any pre-spellcheck functionality
> > gnv_App.EVENT ue_prespellcheck()
>
> > IF inv_ole.ConnectToNewObject("word.application") <> 0
> > THEN
> > gnv_App.inv_error.of_Message("pfc_systemerror", &
> > {"CCAIN could not connect to MS Word. Please
> > contact Systems Support."})
> > RETURN FAILURE
> > END IF
>
> > inv_ole.Application.Visible = TRUE
> > inv_ole.Application.WindowState = ii_WordWindowState
>
> > inv_ole.Documents.Add
> > inv_ole.ActiveDocument.Activate
> > inv_ole.ActiveDocument.Range(0,0).InsertAfter(aa_text)
>
> > //Check based on desired style
> > CHOOSE CASE ii_style
> > CASE SPELL_GRAMMER
> > inv_ole.ActiveDocument.CheckGrammar
> > <<<<<<<<<<<<<-----------It's puking right here, and
> > CASE SPELLONLY
> > inv_ole.ActiveDocument.CheckSpelling
> > <<<<<<<<<<<<<-----------It's puking right here, depending
> > which spellcheck you want to do END CHOOSE
>
> > inv_ole.selection.wholestory()
>
> > //get the results of the spellchecker back
> > la_getback = inv_ole.selection.text
>
> > //identify the type of data returned. Data returned may be
> > string, numeric, or date
> > //Find out which one it was and then assign it to a string
> > CHOOSE CASE classname(la_getback)
> > CASE "boolean"
> > ls_holdtext = lnv_conversion.of_String(la_getback,
> > 'TRUEFALSE')
>
> > CASE "integer", "long", "float", "double", "decimal",
> > "time", "date", "datetime"
> > ls_holdtext = string(la_getback)
>
> > CASE "string"
> > ls_holdtext = la_getback
>
> > END CHOOSE
>
> > IF ls_holdtext <> aa_text THEN aa_text = Mid(ls_holdtext,
> > 1, len(ls_holdtext) - 1)
>
> > inv_ole.ActiveDocument.Saved=TRUE
> > inv_ole.ActiveDocument.Close
> > inv_ole.Application.Quit(0, 1, FALSE) //quit, and don't
> > save changes
>
> > //Perform any post-spellcheck functionality
> > gnv_App.EVENT ue_postspellcheck()
>
> > RETURN SUCCESS