Reply
 
Thread Tools Display Modes
  #1   Report Post  
Vicki
 
Posts: n/a
Default Macro - Organisation chart

Hi... I'm trying to create a Macro in Word 2002, to open the Organisation
chart dialog box. While recording the macro, I click Insert/Organisation
chart, the
dialog box doesn't open and the macro just waits for my next instruction.

Does anyone know why the macro won't open the Org chart dialog box?

And for those who are into VB & recording of Macros, can you suggest a good
site for information on what the Macro recorder won't record?... (ie I
haven't been able to record copying data from Word and exporting to Excel)

Thank you!
  #2   Report Post  
Word Heretic
 
Posts: n/a
Default

G'day "Vicki" ,

Once you get into writing VBA rather than creating terrible code with
the recorder, you never go back. The recorder does things from a users
POV, but stops where interactive dialogs or wizards have backing
functions that haven't been exposed and cannot be thusly created.

Sometimes you can feed key strokes into the buffer with vba's sendkeys
func and display the dialog using the Dialogs() object but not always.

In the case of an org chart, I would tend to work with a pre-existing
chart, rather than rebuild from scratch. With a pre-existing chart, I
can look at the shapes collection and modify accordingly. I have no
experience with this object though, so I am unsure if it is possible.

To test, create a doc with a single org chart in it and nothing else.
Flip over into the VBE (Alt+F11) and enter this into the Immediate
Window (Ctrl+G)

? ActiveDocument.Shapes.Count
? ActiveDocument.ShapeRanges.Count

If either is 0 then we have a 'simple' means of addressing the
chart.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Vicki reckoned:

Hi... I'm trying to create a Macro in Word 2002, to open the Organisation
chart dialog box. While recording the macro, I click Insert/Organisation
chart, the
dialog box doesn't open and the macro just waits for my next instruction.

Does anyone know why the macro won't open the Org chart dialog box?

And for those who are into VB & recording of Macros, can you suggest a good
site for information on what the Macro recorder won't record?... (ie I
haven't been able to record copying data from Word and exporting to Excel)

Thank you!


  #3   Report Post  
Vicki
 
Posts: n/a
Default

Hi Steve

Thank you for your response, I'll use your tip and go with using a
pre-existing chart. As I'm not strong on my VBA knowledge, this will be
easier for me.

Speaking of VBA code, do you have any tips on how I could quickly grasp the
basics of this code? I train Word XP Advanced but my knowledge stops when it
comes to stepping into the Macro code.

cheers
Vicki

"Word Heretic" wrote:

G'day "Vicki" ,

Once you get into writing VBA rather than creating terrible code with
the recorder, you never go back. The recorder does things from a users
POV, but stops where interactive dialogs or wizards have backing
functions that haven't been exposed and cannot be thusly created.

Sometimes you can feed key strokes into the buffer with vba's sendkeys
func and display the dialog using the Dialogs() object but not always.

In the case of an org chart, I would tend to work with a pre-existing
chart, rather than rebuild from scratch. With a pre-existing chart, I
can look at the shapes collection and modify accordingly. I have no
experience with this object though, so I am unsure if it is possible.

To test, create a doc with a single org chart in it and nothing else.
Flip over into the VBE (Alt+F11) and enter this into the Immediate
Window (Ctrl+G)

? ActiveDocument.Shapes.Count
? ActiveDocument.ShapeRanges.Count

If either is 0 then we have a 'simple' means of addressing the
chart.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Vicki reckoned:

Hi... I'm trying to create a Macro in Word 2002, to open the Organisation
chart dialog box. While recording the macro, I click Insert/Organisation
chart, the
dialog box doesn't open and the macro just waits for my next instruction.

Does anyone know why the macro won't open the Org chart dialog box?

And for those who are into VB & recording of Macros, can you suggest a good
site for information on what the Macro recorder won't record?... (ie I
haven't been able to record copying data from Word and exporting to Excel)

Thank you!



  #4   Report Post  
Word Heretic
 
Posts: n/a
Default

G'day "Vicki" ,

I found the best way was to use the object explorer (F2) from inside
the VBE (Alt+F11). Start with high level objects like Document,
Application and System and check out what hangs under them.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Vicki reckoned:

Hi Steve

Thank you for your response, I'll use your tip and go with using a
pre-existing chart. As I'm not strong on my VBA knowledge, this will be
easier for me.

Speaking of VBA code, do you have any tips on how I could quickly grasp the
basics of this code? I train Word XP Advanced but my knowledge stops when it
comes to stepping into the Macro code.

cheers
Vicki

"Word Heretic" wrote:

G'day "Vicki" ,

Once you get into writing VBA rather than creating terrible code with
the recorder, you never go back. The recorder does things from a users
POV, but stops where interactive dialogs or wizards have backing
functions that haven't been exposed and cannot be thusly created.

Sometimes you can feed key strokes into the buffer with vba's sendkeys
func and display the dialog using the Dialogs() object but not always.

In the case of an org chart, I would tend to work with a pre-existing
chart, rather than rebuild from scratch. With a pre-existing chart, I
can look at the shapes collection and modify accordingly. I have no
experience with this object though, so I am unsure if it is possible.

To test, create a doc with a single org chart in it and nothing else.
Flip over into the VBE (Alt+F11) and enter this into the Immediate
Window (Ctrl+G)

? ActiveDocument.Shapes.Count
? ActiveDocument.ShapeRanges.Count

If either is 0 then we have a 'simple' means of addressing the
chart.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Vicki reckoned:

Hi... I'm trying to create a Macro in Word 2002, to open the Organisation
chart dialog box. While recording the macro, I click Insert/Organisation
chart, the
dialog box doesn't open and the macro just waits for my next instruction.

Does anyone know why the macro won't open the Org chart dialog box?

And for those who are into VB & recording of Macros, can you suggest a good
site for information on what the Macro recorder won't record?... (ie I
haven't been able to record copying data from Word and exporting to Excel)

Thank you!




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I edit an organisation chart in Word 97? A Cyber Ignoramus Microsoft Word Help 0 January 25th 05 07:57 PM
Formatting of Text in Chart KSBMW2040 Microsoft Word Help 1 January 18th 05 10:06 AM
Edit an organisation chart without re-formatting into VBA color-f. 124kerryw Microsoft Word Help 1 January 5th 05 10:17 PM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM
inserting pictures on an organisation chart Peter Jamieson Mailmerge 0 November 25th 04 06:38 PM


All times are GMT +1. The time now is 03:02 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"