

- #ALLOW RICH TEXT FORMATTING HOW TO#
- #ALLOW RICH TEXT FORMATTING UPDATE#
- #ALLOW RICH TEXT FORMATTING CODE#
You can use the following properties to specify these fonts for a specific document range: Property Each set includes font names for different languages. A document theme contains two sets of fonts (Headings and Body). The Rich Text Editor supports theme fonts. TitleFormatting.ForeColor = Color.DarkBlueĭocument.EndUpdateCharacters(titleFormatting) ' Set the character size, font name and color ' Provide access to the character propertiesĭim titleFormatting As CharacterProperties = document.BeginUpdateCharacters(range) ' The target range is the first paragraphĭim range As DocumentRange = document.Paragraphs(0).Range TitleFormatting.ForeColor = Color.DarkBlue ĭocument.EndUpdateCharacters(titleFormatting) Set the character size, font name and color Provide access to the character propertiesĬharacterProperties titleFormatting = document.BeginUpdateCharacters(range) The target range is the first paragraphĭocumentRange range =
#ALLOW RICH TEXT FORMATTING CODE#
The code sample below uses this API to modify the text color and the font type.
#ALLOW RICH TEXT FORMATTING UPDATE#
Initiates the update session and provides access to CharacterProperties for the specified range.įinalizes the character formatting update. The following members allow you to change character formatting for a given range. Use both character and paragraph formatting for a specific document range, for instance, for the document title as shown below. RichEditControlCompatibility.DefaultFontName = "Tahoma" Īpplication.SetCompatibleTextRenderingDefault(False)ĭ = 8ĭ = "Tahoma" RichEditControlCompatibility.DefaultFontSize = 8 Specify these properties before initialization of all controls, in the Main method, as illustrated in the following code.Īpplication.SetCompatibleTextRenderingDefault(false) The static RichEditControlCompatibility.DefaultFontSize and RichEditControlCompatibility.DefaultFontName properties set the default font settings for all RichEditControl instances in the application. ' Set the default font, size and forecolor Private Sub RichEditControl1_DocumentLoaded(ByVal sender As Object, ByVal e As EventArgs) Set the default font, size and forecolor If you must convert, you’ll have to reapply the HTML tags.Private void RichEditControl1_DocumentLoaded(object sender, EventArgs e) Trying to display previously stored RTF encoded text in the new rich text control won’t work. As I mentioned, the rich text support is HTML, not Rich Text Format (RTF). mdb version database that uses a third-party rich text control or VBA code to support rich text, you might run into a snag. Then, using the available options in the Text Formatting group, format away! The entry below contains italics and bold. For example, after entering text in the bound text box control, select a few characters or words. Simply enter the text and format it as you would in Word. Implementing the new support for rich text couldn’t be simpler. Once you switch back to plain text, the control will display text and HTML tags for existing entries. If you change the property at the table level, the bound control will not update accordingly. A bound control will inherit this property.

The Text Format property is new and Plain Text is the default setting.
#ALLOW RICH TEXT FORMATTING HOW TO#
Using Access 2010, let’s take a quick look at how to apply the rich text setting: Behind the scenes, Access is actually using HTML – something that probably won’t matter to most users, but might matter to SharePoint and database developers and anyone upgrading an. Specifically, earlier versions don’t allow you to single out a specific word or character within an entry for different formatting. Rich text means formatted text, but a bit more. Access 20 now support easy-to-implement rich text formatting, but only in memo fields. With some slick VBA code or a third-party control you could get it, but it was a lot of work.

mdb versions of Access, working with rich text wasn’t impossible, but it certainly wasn’t easy. Access 20 both support rich text and it's easy to implement. True rich text wasn't supported in Access 2003 (and earlier versions).
