G
Greg Maxey
Using Word2007. If I use Insert>Symbol>More Symbols the Symbol dialog box
opens. If I chose as symbol and click "OK" that symbol is inserted in the
document at the IP. If I click "Cancel" or the dialog box "X" option the
dialog box closes. All as expected.
However, when I use this line of VBA code:
Sub MoreSymbols()
Dialogs(wdDialogInsertSymbol).Show
End Sub
All works as expected, except if I click "Cancel" or the dialog box "X"
option a ghost symbol is inserted at the IP. If I select that symbol and
run:
? Asc(Selection.Text) in the Immediate window it returns 0.
I can work around this issue with:
Sub MoreSymbols()
Application.ScreenUpdating = False
With Dialogs(wdDialogInsertSymbol)
Select Case .Show
Case 0
Case Else
Selection.Move wdCharacter, -1
Selection.Delete
End Select
End With
Application.ScreenUpdating = True
End Sub
What is the ghost symbol? Why does it appear? Is there a better
work-a-round or a way to keep it from appearing in the first place?
Thanks.
opens. If I chose as symbol and click "OK" that symbol is inserted in the
document at the IP. If I click "Cancel" or the dialog box "X" option the
dialog box closes. All as expected.
However, when I use this line of VBA code:
Sub MoreSymbols()
Dialogs(wdDialogInsertSymbol).Show
End Sub
All works as expected, except if I click "Cancel" or the dialog box "X"
option a ghost symbol is inserted at the IP. If I select that symbol and
run:
? Asc(Selection.Text) in the Immediate window it returns 0.
I can work around this issue with:
Sub MoreSymbols()
Application.ScreenUpdating = False
With Dialogs(wdDialogInsertSymbol)
Select Case .Show
Case 0
Case Else
Selection.Move wdCharacter, -1
Selection.Delete
End Select
End With
Application.ScreenUpdating = True
End Sub
What is the ghost symbol? Why does it appear? Is there a better
work-a-round or a way to keep it from appearing in the first place?
Thanks.