Microsoft KB Archive/61513

Cannot Use FormatDefineStyles in a Macro in Word for Windows

PSS ID Number: Q61513 Article last modified on 05-14-1991

1.00 MS-DOS

Summary: FormatDefineStyles and its subdialog boxes (FormatDefineStylesChar, FormatDefineStylesPara, etc.) cannot be opened using the Dialog command in a macro. Additionally, FormatDefineStyles works from a macro, but the define button is always grayed.

More Information: The results for FormatDefineStyles cannot be stored anywhere. Consequently, Word for Windows does not allow the dialog box to come up.

Example
Sub Main Dim dlg as FormatDefineStyles Dialog dlg end sub Select a document window and run the macro. Word for Windows responds with a WordBASIC Err=102 “Command Failed.”

Reference(s):

Additions Keywords: w4wmacro