• Macro to make Org chart (Word 2000)

    Author
    Topic
    #421622

    Edited by HansV to replace code with link to source

    I have checked the net for making an Organistaion chart in Word using a Macro. I have come up with the following macro (Use an Outline to Build an Org Chart)

    However, I observe that the macro does not run and stop at this line:-

    Dim nodeRoot As DiagramNode

    Stating that there is Compile error.

    Can someone help me get this Macro up and running.
    thanks in advance.
    Novice

    Viewing 1 reply thread
    Author
    Replies
    • #958547

      I’m not sure this code will work in Word 2000, it looks like XP code to me. You can check the following:
      – In the Visual Basic Editor, select Tools |References…
      – Make sure that Microsoft Office 9.0 Object Library is checked, then click OK.
      If you still get the compile error, you’re out of luck in Word 2000.

      Note: there is one typo in the code, the line

      Set node1 = nodeRoot.Children.Ad dNode

      should be

      Set node1 = nodeRoot.Children.AddNode

      With that modification, it works without errors in Word 2002 (XP)

      • #958567

        Hans,

        Thanks for the help. Both my machines have Word 2000 with Windows XP and as such the macro does not run.
        Another question, How can I check / see the tips / threads in the archives?

        Thanks in advance
        Novice

        • #958572

          You can click Search in the Lounge menu – see screenshot. Or is that not what you meant?

    • #958595

      That macro was indeed written for Word 2003, and won’t work in Word 2000.

      My apologies that that wasn’t clear in the text; I do plan to fix that when the book reprints.

      • #958740

        Andrew,

        Any chance for getting a Macro for Word2000.

        Thanks in advance,
        Novice.

        • #958783

          Hi Novice,

          Unfortunately, I don’t currently have access to a machine with Word 2000 on it. If I can find one, I’ll poke around a bit, but I don’t remember much in the way of Diagram-related objects in the Word 2000 object model.

    Viewing 1 reply thread
    Reply To: Macro to make Org chart (Word 2000)

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

    Your information: