In Word 2007 if I use Insert>Symbol>More Symbols I am presented with a a dialog with the options “Insert” and “Cancel” at the bottom of the dialog. If I click “Insert”
the selected symbol is inserted if I click “Cancel” nothing is inserted (same if you click the “X” in top corner).
If I use the following macro I am presented with a a dialog with the options “OK” and “Cancel” at the bottom of the dialog. If I click “OK” the selected symbol is inserted
if I click “Cancel” or the “X” button then a odd symbol (a y with two dots over it) is inserted.
Sub ScratchMaco1()
Dialogs(wdDialogInsertSymbol).Show
End Sub
I thought that by modifying that macro as follows that I would be able to work around this issue:
Sub ScratchMaco2()
With Dialogs(wdDialogInsertSymbol)
If .Show <> 0 Then
Selection.Move wdCharacter, -1
Selection.Delete
End If
End With
End Sub
Unfortunately this doesn’t work because regardless of which option I select the .Show method returns “-1”
Does anyone know how to display the first dialog (the one with “Insert” and “Cancel”) using VBA or how to detect the user selection in the second dialog to accurately control
the insert?
Thanks
Greg Maxey Visit my website at: http://gregmaxey.mvps.org/word\_tips.htm