Results 1 to 8 of 8
  • Thread Tools
  1. 2 Star Lounger
    Join Date
    Apr 2002
    Location
    Houston, Tx, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    insert activex object with code (2002 SP3)

    I want to insert an ActiveX object in a slide by using code. The ActiveX object references a file I have on disk.

    Were can I find information about how to do that?

    I already have Shyam Pillai's LiveWeb free add-in. But I want to learn how to do it with code myself.

    Thank you
    Guillermo

  2. Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Re: insert activex object with code (2002 SP3)

    Look up AddOLEObject in the Object Browser, and in the PowerPoint VBA help.

  3. 2 Star Lounger
    Join Date
    Apr 2002
    Location
    Houston, Tx, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: insert activex object with code (2002 SP3)

    How do I get a list of all the ClassName 's available. (example: web page, pdf, etc)

    Your help was great! Thank you
    Guillermo

  4. Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Re: insert activex object with code (2002 SP3)

    I'm afraid I don't know. The information must be available from the registry, probably in the HKEY_CLASSES_ROOT section, but I don;t know where exactly and how to get at it.

    You can record a macro of inserting the types you need; the generated macro code will contain the class name of the objects.

  5. Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: insert activex object with code (2002 SP3)

    Can you do anything with the output of the FTYPE or ASSOC commands?

    StuartR

  6. 2 Star Lounger
    Join Date
    Apr 2002
    Location
    Houston, Tx, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: insert activex object with code (2002 SP3)

    Recording a macro did the job.

    Sub Macro1()
    '
    ' Macro recorded 1/26/2005

    ActiveWindow.Selection.SlideRange.Shapes.AddOLEObj ect(Left:=24#, _
    Top:=300#, Width:=138#, Height:=138#, _
    ClassName:="OpenGL.OpenGLObj.1", Link:=msoFalse).Select
    End Sub

    now I want to link this object a file in my disk (same folder as my powerpoint). I tried adding

    FileName:="test2.r3d"

    but get an error message "Object library invalid orcontains references to object definitionsthat could not be found"

    Is this a syntax problem , or a security setting of our office network that doesn't allow me to save activex objects? (I've heard that we have some restrictions)

    Thank you
    Guillermo

  7. Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Re: insert activex object with code (2002 SP3)

    Let's hope someone else can answer this. I don't have the slightest idea.

  8. Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: insert activex object with code (2002 SP3)

    I think that Filename and Classname should not both be specified. If you want the object to be created from a file then you just specify Filename and leave Windows to work out what sort of file it is.

    StuartR

Posting Permissions

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