Results 1 to 4 of 4

Thread: Error while creating Organizational Chart in Powerpoint (VBA)

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    2

    Error while creating Organizational Chart in Powerpoint (VBA)

    Hello Friends,

    I am trying to automate PowerPoint using VB6. I want to dynamically create an organizational chart in Powepoint, from a VB6 application.

    I have Office 2003.

    I am getting error on the following line, when i try to add a node in the Organizational Chart.

    ppSlide3.Shapes.AddOLEObject 100, 150, 400, 300, "OrgPlusWOPX.4"

    Error:
    Runtime-error: '-2147467259 (80004005)':
    Method "AddOLEObject" of object "Shapes failed"


    I have used the code provided on the following link:

    http://support.microsoft.com/kb/222929

    Kindly help me out in this regard.

    I would be grateful.

    Have a great day
    Bye

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Error while creating Organizational Chart in Powerpoint (VBA)

    what is ppslide3?
    is it just a slide in your presentation or an object in your vb code?
    are other parts of the code working correctly?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    2

    Re: Error while creating Organizational Chart in Powerpoint (VBA)

    ppslide3 is a Powerpoint Slide object created in my VB Code.

  4. #4
    New Member
    Join Date
    Jan 2002
    Posts
    1

    Thumbs down Re: Error while creating Organizational Chart in Powerpoint (VBA)

    Hi

    I noticed this post and was wondering if you found a solution and if you can share how you actually create the boxes of the org chart.

    Looking forward to hearing from you

    Regards

    Meir

Posting Permissions

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



Click Here to Expand Forum to Full Width