?
Solved

Insert symbol dialog for application

Posted on 2005-03-17
4
Medium Priority
?
213 Views
Last Modified: 2012-06-27
I have a small text editor that I have written using the RTFText control. I would now like to add a button which will show something like the Insert Symbol dialog so a user can graphically insert various symbols without having to use the ALT<nnn> codes.

A small snippet of code would be great.
0
Comment
Question by:CharlesSHill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
dr_binks earned 375 total points
ID: 13572610
create another form with a listbox and add this code:

Private Sub Form_Load()
    Dim I As Integer
   
    For I = 1 To 255
        ' Fills lstSymbols with Symbols
        If I < 10 Then
            lstSymbols.AddItem I & "     -  " & Chr(I)
        ElseIf I < 100 Then
            lstSymbols.AddItem I & "   -  " & Chr(I)
        Else
            lstSymbols.AddItem I & " -  " & Chr(I)
        End If
    Next I
End Sub

Private Sub lstSymbols_DblClick()
    ' Insert selected symbol to rtfText
   formname.rtftextboxname = formname.rtftextboxname & Right(lstSymbols.Text, 1)
End Sub

I hope that helps

~Binks
0
 
LVL 12

Expert Comment

by:gbzhhu
ID: 13573594
If you don't mind refrencing word then:
Create word object (keep hidden)
Create word document (invisible)

then

Dim dlg As Dialog
Set dlg = Application.Dialogs(wdDialogInsertSymbol)
dlg.Show
MsgBox ActiveDocument.Paragraphs(1)   'should return the symbol user selected
0
 

Author Comment

by:CharlesSHill
ID: 13575165
No MSWord on the targe computer
0
 
LVL 12

Expert Comment

by:gbzhhu
ID: 13575258
Then AFAIK you will have to create your own interface (form, listbox etc) and populate with symbols as suggested by Binks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question