Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to make Org chart (Word 2000)

    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

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

    Re: Macro to make Org chart (Word 2000)

    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)

  3. #3
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to make Org chart (Word 2000)

    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

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

    Re: Macro to make Org chart (Word 2000)

    You can click Search in the Lounge menu - see screenshot. Or is that not what you meant?
    Attached Images Attached Images
    • File Type: png x.PNG (8.5 KB, 0 views)

  5. #5
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to make Org chart (Word 2000)

    Hans,

    Ok, the search button should serve my purpose.
    Thanks
    Novice

  6. #6
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to make Org chart (Word 2000)

    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.

  7. #7
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to make Org chart (Word 2000)

    Andrew,

    Any chance for getting a Macro for Word2000.

    Thanks in advance,
    Novice.

  8. #8
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to make Org chart (Word 2000)

    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.

Posting Permissions

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