Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8734317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:49:12+00:00 2026-06-13T09:49:12+00:00

I am trying to set the text color using Word VBA. However, it seems

  • 0

I am trying to set the text color using Word VBA. However, it seems that Word doesn’t take the color change as “change”. Take the following VBA code for example, after I run it, Word Undo doesn’t contain anything. If I quit the Word directly, Word will not prompt for saving the changes. Could you help to comment? Thank you very much for your opinions!

Public Sub Test()
    ActiveDocument.Range.Font.TextColor = wdColorBlue
End Sub

PS: Word 2010 x86 on Windows 7 SP1 X64.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:49:13+00:00Added an answer on June 13, 2026 at 9:49 am

    Instead of using the TextColor property, use the Color property:

    ActiveDocument.Range.Font.Color = wdColorBlue
    

    If you do it like this, with Font.Color, Word will register the change and treat it as something to undo. The TextColor property is not officially a configurable property by Word; the docs define it as Read-Only. The fact that you can effectively change the text color via the TextColor property is anomalous, as is the fact that vba’s intellisense brings up TextColor and not Color when typing “Font.”; nevertheless, it is clear that (at least at one level) Word treats TextColor as read-only, and hence it does not fully register changes to that property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to set focus on a hidden text box. I want that
I'm trying to set the focus on a text input element using document.getElementById( 'id'
Trying to change the selected text background color for an NSTextField (we have a
I'm trying to change the text color in my widget depending on an if
I am trying to set the backbutton text color (to red) of my navbar
I'm trying to color code text in a legend. (Since I'm trying to sort
In HTML Canvas I can set the color of a line of text using
I'm trying to set up code so that the user can drag from a
I am trying to link buttons using a button tag that is set to
I am trying to make an application that will show text using OpenGL. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.