Word COM API ShowHiddenText will hide images

Connor Shore 186 Reputation points
2024-05-17T13:56:52.0633333+00:00

Hi I have a question regarding the Word C# COM API. In our application we have a button to hide our custom tags (which are just field codes), however a customer of ours is reporting an issue where their background image is being hidden when that button is clicked. The button toggles this value:

NativeActiveDocument.ActiveWindow.View.ShowHiddenText

(Note: NativeActiveDocument is a Microsoft.Office.Interop.Word.Document object)

My question is, what specific property or setting on an image allows it to be hidden by the ShowHiddenText property? Is there a property on an image you can set that will disable it from being hidden? Or is there a different COM API property we can use that will only show/hide text and not impact images?

Thanks in advance!

P.S. Let me know if you need access to the document to view the existing images properties.

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,702 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,005 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,172 questions
0 comments No comments
{count} votes

Accepted answer
  1. John Korchok 5,421 Reputation points
    2024-05-17T16:16:00.0266667+00:00

    Images that are inline with text can be marked as hidden text, and can then become invisible. Floating images can disappear if they are anchored to text marked as hidden.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.