General information
Category:
COM/DCOM and OLE Automation
>I am trying to add an OLE container object to a form and have the ability to change the documentfile property based on user selection. I have tried it two ways:
>
>1) Adding a OLE container control onto the form and setting the OLEClass, Linked and DocumentFile properties in the property page. This works fine, but I need to programmically change the documentfile property based on a selection from the user. The problem is the documentfile property is read-only. Can it be done this way?
>
>2) Adding the control using code: thisform.ADDOBJECT("ole2", "olecontrol", "word.document.6"). This statement alone does not work. I have read that you can add onto the statement, parameters (I assume the document file and the linked property) that are passed to the objects INIT event. But I am not sure how the INIT event is invoked and how I can create one with the LPARAMETER statement if the object is being created in code.
>
>Can anyone help?
>Becky
AFAIK, if you're building the above class visually, you should be able to place the parameters at the top of the init method.
HTH
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only