• insert activex object with code (2002 SP3)

    Author
    Topic
    #415064

    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

    Viewing 0 reply threads
    Author
    Replies
    • #924736

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

      • #924876

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

        Your help was great! Thank you

        • #924884

          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.

          • #924909

            Recording a macro did the job.

            Sub Macro1()

            ‘ Macro recorded 1/26/2005

            ActiveWindow.Selection.SlideRange.Shapes.AddOLEObject(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

            • #924910

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

            • #924911

              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

        • #924886

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

          StuartR

    Viewing 0 reply threads
    Reply To: insert activex object with code (2002 SP3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: