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.ole-ocx-activex 6324 articles. 0 followers. Follow

0 Replies
1055 Views

Similar Articles

[PageSpeed] 55

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 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...

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...

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...

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 ...

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...

WordPerfect: OLE automation through OLE control
OK, I connected to WordPerfect from PB6.5 by using OLEObject like: OLEObject ole_obj ole_obj= CREATE OLEobject li_rc=ole_obj.ConnectToNewObject ("WordPerfect.PerfectScript") ........ Now it accepts automation commands. But my goal is to start OLE automation through Object property of OLE control. Something like: ole_1.Activate(Offsite!) ole_obj=ole_1.Object.WordPerfect.PerfectScript ..... And that does not work though it does with Word. Does somebody know if it is possible at all to make OLE automation through OLE control and how to do that? Thanks ...

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 ...

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...

how to close down ole in OLE container?
Hi, I have a piece of code which opens a blob stored in the database as an OLE, in order to print it in the form of a word document. While the document is printed, MS word is activated, and the document is visible. The problem is that if I have a number of blobs to print, and I have the code (part of it reproduced below) in a loop, all the blobs open up as word documents. I need to add some processing which would enable the opened documents to close down. ole_1.objectdata = bl_object i_return = ole_1.Activate(offsite!) IF i_return = 0 THEN ole_1.object.application.wordbasic....

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

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 ...

The US needs gun control to protect children like my grandson, killed at Sandy Hook
Motives do not matter to the dead. They don't matter much to survivors, either.

Microsoft Band updated to include music controls and inactivity alerts
... Microsoft Band came out, the company is adding functionality with a small software update. The two biggest features of this update—music controls ...

"... Trump owns and controls the media... they can't not cover him... his audience is bigger than theirs ...
... their army (i.e., the media) can't take out their enemy. They don't have the slightest idea what to do.... The media, in their own minds, controls ...

Sandy Hook parents assess victories, defeats in gun control mission
CBS News Sandy Hook parents assess victories, defeats in gun control mission CBS News NEWTOWN, Conn. Three years ago on Monday, a gunman opened ...

How to use iOS or Apple Watch as remote controls with Apple TV
... new feature for Apple TV owners using Apple Watch, iPad or iPhones last week – the capacity to use your iOS device as a remote control for your ...

Hilarious: ‘Burglars For Gun Control’ Sums Up The Left’s Entire Argument
'As long as law abiding citizens have guns, it's that much harder for burglars like me to do my job.'

Bart & Fleming: Don’t Come To Year-End Movies To Get Laid; Time For Movies About Gun Control Debate?
Peter Bart and Mike Fleming Jr. worked together for two decades at Daily Variety . In this weekly Sunday column, two old friends get together ...

Republique finally gets analog controls on PS4
... transitions (like Resident Evil ) which is mildly disorienting at first but could actually be easier to wrap your head around with a controllable ...

Microsoft Band 2 gets new music controls and activity reminders
... has revealed a few fresh features for the device, designed to make it smarter and more functional. For starters, there are new music controls, ...

Resources last updated: 12/15/2015 1:37:11 AM