VB6 OLE question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Will

    #1

    VB6 OLE question

    I'm creating a small app which has an OLE container of class
    "Word.Document. 8". Through code, I'd like to access the embedded
    document, insert a picture, and modify the picture's size property.

    If I were to do it using Word's VBA, the code for inserting the picture
    would look something like this:

    Selection.Inlin eShapes.AddPict ure Filename:="...p ath to the picture..."

    I've tried OLE1.object.Sel ection.InlineSh apes.AddPicture , I've also
    tried to create an instance of Word:

    Set WApp = CreateObject("W ord.Application ")

    but can't seem to associate my object variable to the imbedded Word
    Document.

    Where am I going wrong?

    Thanks,
    William
Working...