Learning OLE......?

Hi!
My name is Jim and i have the following question (or problem!):

I have a form and i place on it an OLE control.
OLE contains a word document.When the form is on runtime i double click
in the word icon (which is inside OLE now) and the document its open.
So far ok..

But how can i insert a value from the form to a specific place in the document?
e.g: text1.text="Test"

the word document sais: Hello jim, come to Test (text1.text value from the form1)

Thanks..
Jim-Greece

Comments

  • : Hi!
    : My name is Jim and i have the following question (or problem!):
    :
    : I have a form and i place on it an OLE control.
    : OLE contains a word document.When the form is on runtime i double click
    : in the word icon (which is inside OLE now) and the document its open.
    : So far ok..
    :
    : But how can i insert a value from the form to a specific place in the document?
    : e.g: text1.text="Test"
    :
    : the word document sais: Hello jim, come to Test (text1.text value from the form1)
    :
    : Thanks..
    : Jim-Greece
    :
    :

    I would use VBA not OLE

  • : But how can i insert a value from the form to a specific place in the document?
    : e.g: text1.text="Test"
    :
    : the word document sais: Hello jim, come to Test (text1.text value from the form1)

    You need to create a document template with a bookmark where you want to insert the value. You'll need to Reference the Microsoft Word Object Library and instantiate an Application object to create a new Document object using your template. Then you will be able to insert whatever text you like at that bookmark.

    I'm sure you can find plenty of tutorials or examples online.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories