Oh yes, forgot to mention, using WinXP SP2 and Word 2003 SP1.
> Oh yes, forgot to mention, using WinXP SP2 and Word 2003 SP1.
>
[quoted text clipped - 10 lines]
>>
>> What am I doing wrong?
When you execute that line of code, is the selection (insertion point)
inside a table in the active document? That condition must be true in order
to display that dialog from code. (In the UI you can use the Table > Table
AutoFormat command to display the dialog when not in a table, but clicking
OK immediately runs the Insert Table dialog. This is a special case in the
UI and isn't available to code.)
You can test this assumption by calling
Selection.Information(wdWithInTable) -- however you have to mangle that to
get the right syntax -- it returns True if the Selection is entirely within
a table.

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Haydn Robinson - 19 Sep 2005 16:05 GMT
No the selection isn't in a table. What I have is a dialog my end that
allows someone to setup a table, with the added option of picking a
pre-defined Word table style. What I wanted was a button on my dialog that
would bring up the Word auto format dialog, so the user can see what style
they're getting. Looks like I'll have to fall back to a dropdown with just
the names of the styles in.
Thanks for that.
Haydn
> > Oh yes, forgot to mention, using WinXP SP2 and Word 2003 SP1.
> >
[quoted text clipped - 22 lines]
> get the right syntax -- it returns True if the Selection is entirely within
> a table.