OLE Word97 and ole objects vs ole controls

--------------50D299EA9D99A20C83E801AB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am new to OLE  automation.  I'm trying to connect to a word97 document
and filling  forms fields with information.  I'm trying to use the
following code.
I'm getting the following error in my log file:


DateTime: 10/27/99 18:32:07 Title: System Error Message: Error Number
36.
Error text = Name not found accessing external object property object.
Window/Menu/Object = w_ole_test.
Error Object/Control = cb_okay.
Script = clicked.
Line in Script = 22. User:  Comments:
DateTime: 10/27/99 18:32:17 Title: System Error Message: Error Number
21.
Error text = Bad runtime function reference.
Window/Menu/Object = w_ole_test.
Error Object/Control = cb_okay.
Script = clicked.
Line in Script = 22. User:  Comments:


This is my code  I"m trying to use.  I've tried alot of things but I
can't get anything to work.

oleobject  ole_encform
olecontrol  ole_ctrl_encform
n_cst_ole lnv_ole
Integer li_ret
String  ls_encnbr, ls_client_name, ls_clientid, ls_fundsrc, ls_encloc,
ls_proovname, ls_dob, ls_encdate, ls_enctime, ls_prictr



If dw_1.event pfc_retrieve() = 1 Then
lnv_ole = CREATE n_cst_ole
//Getting the information to populate word form fields from the Registry

lnv_ole.of_get_encform_info(ls_encnbr, ls_client_name, ls_clientid,
ls_fundsrc, ls_encloc, ls_proovname, ls_dob, ls_encdate, ls_enctime,
ls_prictr)


//Activate Word using a datawindow
   dw_1.OleActivate (dw_1.GetRow(), "encform_blob", 0)


//Create my ole object and connect to my word application
ole_encform = CREATE oleobject
li_ret = ole_encform.ConnectToNewObject("word.application.8")


If li_ret < 0 Then
  return
End If
ole_encform.object.Application.ActiveDocument.FormFields("enc_nbr").Result

= ls_encnbr    //My line 22


//Code I tried to use with a OLE control
// ole_ctrl_encform = CREATE olecontrol
// ole_ctrl_encform.InsertClass("word.document.8")
//
ole_ctrl_encform.object.VBProject.wwis_encform.Get_EncounterForm_Info
End If



I'm not sure whether to use an ole object or an ole control.  I've been
experimenting with both controls.  I would appreciate any and all help.
I
needed to have this
done yesterday.



Thanks,



Sheila M. Chittams

--------------50D299EA9D99A20C83E801AB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I am new to OLE&nbsp; automation.&nbsp; I'm trying to connect to a word97
document and filling&nbsp; forms fields with information.&nbsp; I'm trying
to use the following code.
<br>I'm getting the following error in my log file:
<br>&nbsp;
<p>DateTime: 10/27/99 18:32:07 Title: System Error Message: Error Number
36.
<br>Error text = <b><i><font color="#FF0000">Name not found accessing external
object property object.</font></i></b>
<br>Window/Menu/Object = w_ole_test.
<br>Error Object/Control = cb_okay.
<br>Script = clicked.
<br>Line in Script = 22. User:&nbsp; Comments:
<br>DateTime: 10/27/99 18:32:17 Title: System Error Message: Error Number
21.
<br>Error text = <b><i><font color="#FF0000">Bad runtime function reference.</font></i></b>
<br>Window/Menu/Object = w_ole_test.
<br>Error Object/Control = cb_okay.
<br>Script = clicked.
<br>Line in Script = 22. User:&nbsp; Comments:
<br>&nbsp;
<p>This is my code&nbsp; I"m trying to use.&nbsp; I've tried alot of things
but I can't get anything to work.
<p>oleobject&nbsp; ole_encform
<br>olecontrol&nbsp; ole_ctrl_encform
<br>n_cst_ole lnv_ole
<br>Integer li_ret
<br>String&nbsp; ls_encnbr, ls_client_name, ls_clientid, ls_fundsrc, ls_encloc,
<br>ls_proovname, ls_dob, ls_encdate, ls_enctime, ls_prictr
<br>&nbsp;
<br>&nbsp;
<p>If dw_1.event pfc_retrieve() = 1 Then
<br>lnv_ole = CREATE n_cst_ole
<br>//Getting the information to populate word form fields from the Registry
<br>lnv_ole.of_get_encform_info(ls_encnbr, ls_client_name, ls_clientid,
<br>ls_fundsrc, ls_encloc, ls_proovname, ls_dob, ls_encdate, ls_enctime,
<br>ls_prictr)
<br>&nbsp;
<p>//Activate Word using a datawindow
<br>&nbsp;&nbsp; dw_1.OleActivate (dw_1.GetRow(), "encform_blob", 0)
<br>&nbsp;
<p>//Create my ole object and connect to my word application
<br>ole_encform = CREATE oleobject
<br>li_ret = ole_encform.ConnectToNewObject("word.application.8")
<br>&nbsp;
<p>If li_ret &lt; 0 Then
<br>&nbsp; return
<br>End If
<br>ole_encform.object.Application.ActiveDocument.FormFields("enc_nbr").Result
<br>= ls_encnbr&nbsp;&nbsp;&nbsp; //My line 22
<br>&nbsp;
<p>//Code I tried to use with a OLE control
<br>// ole_ctrl_encform = CREATE olecontrol
<br>// ole_ctrl_encform.InsertClass("word.document.8")
<br>//&nbsp; ole_ctrl_encform.object.VBProject.wwis_encform.Get_EncounterForm_Info
<br>End If
<br>&nbsp;
<br>&nbsp;
<p>I'm not sure whether to use an ole object or an ole control.&nbsp; I've
been
<br>experimenting with both controls.&nbsp; I would appreciate any and
all help.&nbsp; I
<br>needed to have this
<br>done yesterday.
<br>&nbsp;
<br>&nbsp;
<p>Thanks,
<br>&nbsp;
<br>&nbsp;
<p>Sheila M. Chittams</html>

--------------50D299EA9D99A20C83E801AB--

0
Sheila
10/28/1999 1:47:36 AM
sybase.powerbuilder.objects 3160 articles. 0 followers. Follow

0 Replies
1160 Views

Similar Articles

[PageSpeed] 12

Reply:

Similar Artilces:

OLE Control vs OLE dw object vs OLE Column in dw object
Dear all, I'm using PB 6.5.1 with PFC. I'm trying to right Mail Merge like function in a system. Thus, we've to keep the merged document into history for later referece. I'm wondering the difference between OLE Control vs OLE dw object vs OLE Column in dw object??? Can anyone give some ideas on the above and what is the usage of it?? On the other hand, I'm wondering whether I'm using the RTE dw object for mail merge and then save the whole content into a OLE Database blob column, or using OLE control to MS Word + using DDE to transfer the data to MS Word?? ...

OLE Object properties of type OLE Object
I have 2 ocx's, both of which have a property of type OLEObject. One object initializes this property, the other one then needs to use it. However I cannot make an assignment like this work : ole_2.Object.Session = ole_1.Object.Session Session is the property name of the type OLEObject property for both ocx's. Any suggestions or help would be greatly appreciated!! Thanks, Ian Foutz ifoutz@kpmg.com ...

OLE Custom Control vs. OLE Control
I am using PB 6.0, and am hoping someone can explain something to me. I created a Standard Visual user object based on the olecontrol class (referencing Word). This is called an OLE Custom Control, or at least that's what the properties window says. Why is this different than a regular OLE control? Why is the objectdata attribute not valid? Why are some of the events missing (i.e. close, save, and rename)? These events automatically are included in a regular OLE control. Seems odd to me that you can't inherit from the base olecontrol object, but then again, OLE in gen...

Why does OLE Control work but OLE Object doesn't ?
I am trying to deploy a third party ActiveX/OCX in a PowerBuilder NVO (for EAServer). Placing an OLE Control on a window works fine. I can access object properties etc. Using an OLEObject and ConnectToNewObject should accomplish the same result (as per PB documentation) These two code segments should work identically, but the second (which I need to work) produces "Error accessing external object property" error // 1. OLE control placed on a window ole_1.Object.Timeout = 1000 // 2. ActiveX control placed on a window OLEObject ole_obj ole_obj = CREATE OLEObj...

OLE/WORD97 PRINTING OLE CONTROL?
I have an ole control(ole_1) on a response window that contains a MS WORD document. Since it doesn't merge the FILE menu option with Inplace activation, I created a Print button on the window to print the WORD document inside the ole control. However, I haven't been able to successfully do this. What is the correct syntax for printing an ole control WORD document. I have tried the following with no luck: ole_1.object.PrintOut() ole_1.object.application.ActiveDocument.Printout() ole_1.object.ActiveDocument.Printout() Thank You, Jason Try this: ole_1.ActiveDoc...

Get data from ole object in ole datawindow
Could anybody tell me how to get data (like blob myblob = ole_1.objectdata) .But in my case is ole datawindow which has a column is ole object. I try to updateblob using data(bitmap in painbrush) from ole object in datawindow. Thanks. You don't need to use updateblob with ole column objects in datawindows, it is done automatically. Check out Table Blob objects in the online help for details (NB these are broken in builds of 7.0.2 after 8030, but mended in 7.0.3) S. -- Simon Caldwell Get Real Systems Ltd Holtby Manor, Stamford Bridge Road, York, YO19 5LL Tel 01904 481999 F...

Does anyone use OLE container in Datawindow as OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or OLE object in Datawindow? Please Help.
Blank Hello folks, How can I use an OLE container in Datawindows? The situation as follows: I have a datawindow with OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or grid datawindow with OLE object (Excel Chart/Worksheet/Microsoft Graph) in detail band. I have the next result set of datawindow (SQL select/ SP / External) fields: anytext, anynumeric values: first, 1 first, 2 first, 3 second, 1 second, 2 second, 3 I mapped OLE data as follows Group by: anytext Target Data: anytext ...

Does anyone use OLE container in Datawindow as OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or OLE object in Datawindow? Please Help.
Blank Hello folks, How can I use an OLE container in Datawindows? The situation as follows: I have a datawindow with OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or grid datawindow with OLE object (Excel Chart/Worksheet/Microsoft Graph) in detail band. I have the next result set of datawindow (SQL select/ SP / External) fields: anytext, anynumeric values: first, 1 first, 2 first, 3 second, 1 second, 2 second, 3 I mapped OLE data as follows Group by: anytext Target Data: anytext ...

Does anyone use OLE container in Datawindow as OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or OLE object in Datawindow? Please Help.
Blank Hello folks, How can I use an OLE container in Datawindows? The situation as follows: I have a datawindow with OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or grid datawindow with OLE object (Excel Chart/Worksheet/Microsoft Graph) in detail band. I have the next result set of datawindow (SQL select/ SP / External) fields: anytext, anynumeric values: first, 1 first, 2 first, 3 second, 1 second, 2 second, 3 I mapped OLE data as follows Group by: anytext Target Data: anytext ...

Does anyone use OLE container in Datawindow as OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or OLE object in Datawindow? Please Help.
Blank Hello folks, How can I use an OLE container in Datawindows? The situation as follows: I have a datawindow with OLE (Excel Chart/Worksheet/Microsoft Graph) presentation style or grid datawindow with OLE object (Excel Chart/Worksheet/Microsoft Graph) in detail band. I have the next result set of datawindow (SQL select/ SP / External) fields: anytext, anynumeric values: first, 1 first, 2 first, 3 second, 1 second, 2 second, 3 I mapped OLE data as follows Group by: anytext Target Data: anytext ...

How to create a range object in Powerbuilder (Word97 ole)
Can anybody tell me how to declare a range object (using an ole object communicating with Word'97) in Powerbuilder. Preferably with a code example. Thanks a lot. Robert ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp I'm not quite sure I understand what you mean by a 'range object'. can you elaborate further? "Robert Christiaanse" <rwc@hetnet.nl> wrote in message news:RH0LZmGhAHA.309@forums.sybase.com... > Can anybody tell me how to declare a range object (using an ole object > ...

OLE objects, Newbie using OLE demo table
What's up with the inplace and offsite activation? More specifically if I tie events to the itemchanged event of a datawindow using either inplace or offsite, both open offsite! What's up with that? Ok, here's the kicker, when I put those same commands in the double-clicked event of the datawindow I get the error "Error accessing external object property activate at line 10 in double-clicked event of object dw_word of dw_word." Thanks, Christian GOT IT! http://techinfo.sybase.com/css/techinfo.nsf/DocID/ID=42411 -Christian Christian wrote: &g...

ole control not in ole list
Using PB 7.0. I have an OLE control registered which is not in my list of ole objects which are available to be inserted onto a window. Here's the catch. While the control, nethubp.dll, is located in the win\system folder and registered, inorder to use the control properly, I have to go into the oleviewer and remove the "Path To Implementation". This is because at runtime, the dll is accessed from my server, not on the local computer. I can find the control up until I remove the Implementation Path. Any suggestion? The control works fine in a VB app. I need help AS...

Web resources about - OLE Word97 and ole objects vs ole controls - sybase.powerbuilder.objects

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Russell Crowe needs to stop fighting players and take control of his club again
Souths need only look to the Roosters to see how fundamental change is needed

Apple’s iOS 9.3 preview page hints at possible Control Center toggle to enable Night Shift
... If you head to the iOS 9.3 preview page on Apple Canada’s website , you can see that there’s an option to enable Night Shift from Control Center ...

#TBT: The Time Ad Age Went All-In for Gun Control
"Can there be any doubt anywhere that violence and contempt for law and order are doing their rotten best to tear American society apart? "Can ...

New Night Shift mode in iOS 9.3 could have its own Control Center toggle
In all likelihood, youll be able to toggle the new Night Shift mode in iOS 9.3 right from Control Center. It came from Canada At least thats ...

Simple free app alerts you when a program (or hacker) takes control of your webcam
... can take over your webcam without you knowing about it. That's right, malware, hackers or even government agencies like the NSA can take control ...

Cruz control: take a look at his puppet master
Cruz control by digby If you read nothing else today, read this Bloomberg article about Ted Cruz's top benefactor, the certifiably looney tunes ...

Run on Italy's Third Largest Bank? Capital Controls or Bail-Ins Next? Why Take Chances?
... "brilliant" comeback? Not a single fundamental problem with Italy, the ECB, the euro, or Europe in general has been fixed. Capital Controls ...

AlunaGeorge share "I'm In Control" ft. Popcaan
... last year to preview material off the followup to their 2013 debut Body Music, and now the first single is here. It's called "I'm In Control" ...

A guy made a remote control airplane using the fan from an old wall heater
... and old heater in his house when he realized that the blower motor inside of it could work a lot like a jet engine — so he made a remote control ...

Resources last updated: 1/22/2016 10:23:38 AM