Information générale
Catégorie:
COM/DCOM et 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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement