Replace the ReachText tool bar? (1 Viewer)

smig

Registered User.
Local time
Today, 11:01
Joined
Nov 25, 2009
Messages
2,209
Is it possible to replace the ReachText toolbar for a field ?
I want to create my own toolbar adding the Copy, Paste, Cut buttons and removing some of the text formatting existing in the default toolbar.

I also want to disable the right click toolbar for this field
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:01
Joined
May 7, 2009
Messages
19,169
create a custom shortcut menu and bind it to that textbox using Shortcut Menu Bar of Property Sheet->Other while in design view.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:01
Joined
Feb 19, 2013
Messages
16,553
I also want to disable the right click toolbar for this field
don't believe you can for a single control on a form, only all controls (see shortcut menu in form properties). However if you substitute per arnel's suggestion, perhaps that will not be an issue.
 

smig

Registered User.
Local time
Today, 11:01
Joined
Nov 25, 2009
Messages
2,209
create a custom shortcut menu and bind it to that textbox using Shortcut Menu Bar of Property Sheet->Other while in design view.
Thanks, I'll try
will it hide the original RichText menu and the RightClick one ?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:01
Joined
Feb 19, 2013
Messages
16,553
don't think it will hide the richtext menu but I believe putting

SendKeys "^"

in the control mouseup event will take the focus away and hide it again

The right click is a substitution so will hide the original
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:01
Joined
May 7, 2009
Messages
19,169
it will replace the RightClick menu for that textbox.
the one in the Ribbon, you need custom ribbon to remove it.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 09:01
Joined
Feb 19, 2013
Messages
16,553
unless you actually need the rich text features you could always change the text format to plain text
 

smig

Registered User.
Local time
Today, 11:01
Joined
Nov 25, 2009
Messages
2,209
it will replace the RightClick menu for that textbox.
the one in the Ribbon, you need custom ribbon to remove it.
Thanks
Will try
I do use custom ribbons
 

smig

Registered User.
Local time
Today, 11:01
Joined
Nov 25, 2009
Messages
2,209
it will replace the RightClick menu for that textbox.
the one in the Ribbon, you need custom ribbon to remove it.
It's not in the ribbon
when you select a text in a RichText box it load a floating ribbon
I want to replace (Or remove) this one
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 09:01
Joined
Feb 19, 2013
Messages
16,553
It's not in the ribbon
when you select a text in a RichText box it load a floating ribbon
I want to replace (Or remove) this one
see post #5.
 

smig

Registered User.
Local time
Today, 11:01
Joined
Nov 25, 2009
Messages
2,209
I'm trying to use the following code
It will fail for the last 4 elements (Font colors and size). I guess they have wrong numbers.
Where can I find the correct ones?

I looked in here
https://bettersolutions.com/vba/ribbon/face-ids-2003.htm

Code:
Sub CreateRichTextShortcutMenu()

Dim cmbRightClick As Office.CommandBar
Dim cmbControl As Office.CommandBarControl

' Create the shortcut menu.
Set cmbRightClick = CommandBars.Add("cmdRichTextRightClick", msoBarPopup, False, True)

With cmbRightClick
    ' Add the Copy command.
    Set cmbControl = .Controls.Add(msoControlButton, 19, , , True)
  
    ' Add the Cut command.
    Set cmbControl = .Controls.Add(msoControlButton, 21, , , True)
  
    ' Add the Paste command.
    Set cmbControl = .Controls.Add(msoControlButton, 22, , , True)
    
    ' Add the Bold command.
    Set cmbControl = .Controls.Add(msoControlButton, 113, , , True)
     cmbControl.BeginGroup = True
  
    ' Add the Italic command.
    Set cmbControl = .Controls.Add(msoControlButton, 114, , , True)
  
    ' Add the Underline command.
    Set cmbControl = .Controls.Add(msoControlButton, 115, , , True)

    ' Add the Font Color command.
'    Set cmbControl = .Controls.Add(msoControlButton, 3076, , , True)

    ' Add the BackGround Color command.
'    Set cmbControl = .Controls.Add(msoControlButton, 3077, , , True)

    ' Add the Bigger Font command.
'    Set cmbControl = .Controls.Add(msoControlButton, 62, , , True)

    ' Add the Smaller Font command.
'    Set cmbControl = .Controls.Add(msoControlButton, 63, , , True)

End With

Set cmbControl = Nothing
Set cmbRightClick = Nothing

End Sub
 

Users who are viewing this thread

Top Bottom