RichTextBox alternative in VBA

Microsoft OFFICE

    Sponsored Links

    Next

  • 1. Hooking into EditPaste and then reproducing default behavior
    I'm working on a Word template and I need to monitor what's being pasted. I have a Sub in a template called EditPaste that catches when people paste and allows me to check what it is before I call Selection.Paste to actually do the paste. The problem is that the Paste Options menu that appears to the lower right of the pasted text doesn't appear when I do this. I see that there is a Word Command you can bind keys to called EditPasteOption which does what I'd like to do, but I can't figure out any way to invoke that from my code. Is there any way to call this form of paste from inside a Sub? Is there any other way to accomplish this goal? Thanks, Alan
  • 2. How to install Microsoft Office Document Imageing on Windows 2003(x64), when i install it the OCR in MODI doesnt work:
    How to install Microsoft Office Document Imageing on Windows 2003(x64), when i install it the OCR in MODI doesnt work: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154. at MODIDocumentTest.Form1.Form1_Load(Object sender, EventArgs e) in C:\MODI_OCR_TEST\Form1.cs:line 27 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  • 3. Script to insert script in document created from a template
    Hi, I have to create a word template such that i have the following script embedded in the document created from the template ActiveWindow.View.ShadeEditableRanges = False Basically the user wants that the shading on editable ranges should be disabled when a document is created out of the template. The user does not want to go through the process of doing this manually each time the document is created. Any ideas on how this can be done will be greatly appreciated. Thanks,

RichTextBox alternative in VBA

Postby DoctorRaf » Fri, 24 Nov 2006 02:24:00 GMT

I have an application in Excel that uses a RichTextBox control on a
UserForm. Now that my work has updated to Office 2003, the program
loads without this control. Doing some searching, I found that this was
actually intended by Microsoft - why they don't provide a reasonable
workaround or alternative control, I don't know.

Others have found cumbersome workarounds. See:

 http://www.**--****.com/ 


All I want is a control that allows users to input text, word-wraps,
and allows copying and pasting. No pictures or fancy formatting is
required.

Does anyone know of a control I can use in place of the RichTextBox? Or
a simpler, more robust workaround that does not involved changing the
registry?

Thanks a ton. A token gift to anyone with a solution I adopt.


Re: RichTextBox alternative in VBA

Postby Cindy M. » Sat, 25 Nov 2006 02:35:10 GMT

> I have an application in Excel that uses a RichTextBox control on a
 http://www.**--****.com/ 
hread/3ef04a2f2a8cef1e/76252635e022bb41 
As I recall, there is (or was) a Knowledge Base article on this and the reason 
behind the controls not working is a security measure - they aren't signed as "safe 
for initialization". The workaround I remember (the one I can't find today) is to 
use the control in a classic VB project (wrap it) and create your own ActiveX 
control that you can then sign as "safe for initialization"

I know of no other RichText controls that can be used with Office, although "in 
extremis" I suppose you could embed a Word document on a worksheet.

Cindy Meister
INTER-Solutions, Switzerland
 http://www.**--****.com/ (last update Jun 17 2005)
 http://www.**--****.com/ 

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


Re: RichTextBox alternative in VBA

Postby Andy Pope » Sat, 25 Nov 2006 05:25:22 GMT

Hi,

If no fancy formatting is required why will a normal textbox not work 
for you.

EnteryBehaviour = True
WordWrap = True
MultiLine = True

The textbox supports Cut/Copy/Paste.

If you want a right-click context menu of those commands you can add 
that by creating commandbar buttons and using the showpopup method.

Cheers
Andy




Re: RichTextBox alternative in VBA

Postby DoctorRaf » Mon, 27 Nov 2006 01:47:27 GMT

Andy wins the prize! His suggestion led me to a useful workaround using
a textbox.

Thanks! I'll send you an e-mail with a gift.


Similar Threads:

1.Basic word processor (alternative to TextBox/RichTextBox)

Hi, I'm writing a small wordprocessor application and need some kind
of text-input control which I can add basic formatting to. Bold,
italic, colouring words, and the ability to underline (preferably in a
given colour) particular words would be useful also. Would be great if
I could get text-changed type event (key down, etc.)

I've tries using a multiline TextBox, but I think it's too simplistic
for my needs, and I'm struggling to use the RTFTextBox (which I don't
think will have the range I need, anyway.

Can anyone suggest a control I could use for this task?

2.There is the control (RichTextBox) for VBA?

Hello. I want to insert into form (Word VBA) textbox but it have not
context menu. There is any other controls (e.g. RichTextBox) for VBA?
Or not?
Thank you.

3.vba richtextbox control

Can anyone tell me if there is a good third party who deliveres a
richtextbox control for my vba forms.
(Word2003), it woul be nice if the costs where low ;-)))))

4.Alternative for non-VBA applications

Is there an alternative scripting language that allows automating tasks in
Windows applications that don't support VBA or other internal scripting
language directly?


5.VBA - Alternative to Copy & Paste?

Hi!

Does anyone know about possible alternatives to Copy & 
Paste when using Visual Basic for Applications?

I have a large document with text/phrases which I call 
TextBank. When I am going to get text from this textbank 
and use it in another document, I does not want to use 
for example "Selection.Copy" and "Selection.Paste". 

Is there any alternatives to this or do I have to use for 
example XML instead?

6. VBA Word 2003 alternative richtx32.ocx

7. Does Setting RichTextBox.SeletcionStart Change RichTextBox.Text ?!?!?

8. Alternative to Access and VBA



Return to Microsoft OFFICE

 

Who is online

Users browsing this forum: No registered users and 65 guest