Word 2002 Dialogs(wdDialogInsertSymbol)

M

m rafala

Since WD97 I've used the subroutine below to capture the user's symbol
choice from the InsertSymbol dialog:

Private Sub SymbolDlgBox()
Set dlg = Dialogs(wdDialogInsertSymbol)
If dlg.Display() <> -2 Then 'Insert button pushed
SymdlgFont = dlg.Font
SymdlgCharNum = dlg.CharNum
End If
End Sub

-- InsertSymbol dialog appears
-- User clicks on symbol
-- User presses Insert button
-- Dialog goes away
-- my variables have the correct values

With Word 2002, I get this:

-- InsertSymbol dialog appears
-- User clicks on symbol
-- User presses Insert button
-- Dialog DOES NOT go away
-- THE SYMBOL IS INSERTED INTO THE ACTIVE DOCUMENT
-- USER MUST PRESS CANCEL TO DISMISS THE DIALOG

What's particularly annoying is that the user must press cancel to dismiss
the dialog, so my macro's dlg.Display() can never return a value of -1
(Insert).

Does anyone know of another way to use the InsertSymbol dialog so that it
does not insert the character into the active document?
 
C

Cindy M -WordMVP-

Hi M,

I'm afraid it's broken in Word 2002. And I know of no way to work around the
problem, unfortunately. Went 'round and 'round on this myself, a couple of
years ago... FWIW, it's been fixed in Word 2003.
Since WD97 I've used the subroutine below to capture the user's symbol
choice from the InsertSymbol dialog:

Private Sub SymbolDlgBox()
Set dlg = Dialogs(wdDialogInsertSymbol)
If dlg.Display() <> -2 Then 'Insert button pushed
SymdlgFont = dlg.Font
SymdlgCharNum = dlg.CharNum
End If
End Sub

-- InsertSymbol dialog appears
-- User clicks on symbol
-- User presses Insert button
-- Dialog goes away
-- my variables have the correct values

With Word 2002, I get this:

-- InsertSymbol dialog appears
-- User clicks on symbol
-- User presses Insert button
-- Dialog DOES NOT go away
-- THE SYMBOL IS INSERTED INTO THE ACTIVE DOCUMENT
-- USER MUST PRESS CANCEL TO DISMISS THE DIALOG

What's particularly annoying is that the user must press cancel to dismiss
the dialog, so my macro's dlg.Display() can never return a value of -1
(Insert).

Does anyone know of another way to use the InsertSymbol dialog so that it
does not insert the character into the active document?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top