none
How to apply only fonts or color schemes to Word2016 of VSTO? RRS feed

  • Question

  • Please tell me how to implement it.

    Conditions :
      - development lnaguage : C#
      - development environment : VisualStudio Professional 2017
      - project : Microsoft Word 2016 VSTO Add-In

    Supplement : 
      1. We have been confirmed that reflection of theme can be applied with the following functions.

    Globals.ThisAddIn.Application.ActiveDocument.ApplyDocumentTheme("<file path>"); 

      2. Change fonts operation in "MS Word" that we want to program.

       change fonts operatin in   

      

      3. Change coloers operation in "MS Word" that we want to program.

      2. Change colors operation in


    • Edited by id_yodatake Wednesday, October 24, 2018 5:56 AM
    Monday, October 22, 2018 7:13 AM

Answers

  • Hi id_yodatake,

    I am not sure what your problem is? Could you describe your problem in detail?

    The following link is about setting word font and color with C#.

    Set Word Font and Color with C#

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.



    Tuesday, October 23, 2018 9:28 AM
    Moderator

All replies

  • Hi id_yodatake,

    I am not sure what your problem is? Could you describe your problem in detail?

    The following link is about setting word font and color with C#.

    Set Word Font and Color with C#

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.



    Tuesday, October 23, 2018 9:28 AM
    Moderator
  • Thank you for your kind reply.

    I’m sorry I didn’t make it clear enough.
    Details of what we want to achieve are as follows:

    1. Select “Design” tab.

    2. Select some theme.

    3. Apply only the font of the selected theme to the whole document.

    or

    3. Apply only the colors of the selected theme to the whole document.


    Also, I referred to the link you sent.
    According to it, it seems that it is necessary to specify the range and change the font.
    In order to reflect the font to the whole document, it is necessary to specify the Range of the entire text.

    Is my understanding correct?

    Wednesday, October 24, 2018 6:07 AM
  • Hi id_yodatake,

    Did you solve the problem?

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Tuesday, October 30, 2018 2:21 AM
    Moderator
  • Bruce,

    I appreciate your kind advice.

    The problem was almost solved.

    Thank you again for your support.

    Tuesday, October 30, 2018 3:21 AM