Consulting

Results 1 to 6 of 6

Thread: opening/extracting ole object file in excel via excel VBA

  1. #1
    VBAX Regular naris's Avatar
    Joined
    Jul 2008
    Posts
    34
    Location

    Smile opening/extracting ole object file in excel via excel VBA

    Hi,

    I want opening or extracting ole object file in excel via excel VBA , would you help me give the macro script to run it ?

    Thanks,
    Naris

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    To open an embedded ole object in Excel, doubleclick it. Otherwise, you will need to explain what the OLE object is and what you expect to do with the contents in Excel. An attached xls usually helps us help you better.

  3. #3
    VBAX Regular naris's Avatar
    Joined
    Jul 2008
    Posts
    34
    Location
    Dear Kenneth Hobs,

    I want extracted or opened the ole object contained pdf file in my excel file without double clicking the ole object, but via excel macro (please see the file enclosed ), I hope you can help me for this.
    Thanks you for response.

    Regards,
    Naris

  4. #4
    VBAX Tutor Benzadeus's Avatar
    Joined
    Dec 2008
    Location
    Belo Horizonte, Brazil
    Posts
    271
    Location
    Just set the macro to the OLE object instead the shape.

  5. #5
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Does your recorded macro not do what you wanted? It can be simplified by:
    [vba]Sub Macro1()
    ActiveSheet.Shapes("Object 3").Select
    Selection.Verb Verb:=xlPrimary
    End Sub
    [/vba]

    Or the one liner:
    [VBA]ActiveSheet.OLEObjects("Object 3").Verb xlPrimary[/VBA]

  6. #6
    VBAX Regular naris's Avatar
    Joined
    Jul 2008
    Posts
    34
    Location
    thanks

    naris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •