2

I am developing a word add-in using VS c#. As a requirement I need to add a content control to document on a ribbon button click. I am successful in adding content control with placeholder text. But the font style of the placeholder text is always set to default. I need to modify the font style according the font style set by the user on the current document.

How Can I change the font style of content control placeholder text ?

Anup
  • 29
  • 1
  • 2
    How does this have 2 upvotes already? Anyway, @Anup, you should really show us some code, or show what you have tried. – DavidG Mar 16 '20 at 12:32
  • I used below lines of code to add Content Control to doc. Word.ContentControls contentControls = null; Word.ContentControl textContentControl = null; textContentControl = contentControls.Add(Word.WdContentControlType.wdContentControlRichText, selectionRange); textContentControl.SetPlaceholderText(null, null, "placeholder text"); By using above code I can insert a content control with placeholder "placeholder text". I need to change the font style of this placeholder text. How can I achieve this through code? – Anup Mar 17 '20 at 05:31

0 Answers0