none
How to perform small changes to the word document? RRS feed

  • Question

  • I am new to word/office development and I am trying to develop an add-in for the user to do minor modifications to the word document that they open.

    such as 

    1.        Accept all changes in document and stop Change Tracking
    2.        Remove all styles associated with “Deltaview”
    3.        Convert Autonumbers
    4.        Replace all non-breaking spaces with regular spaces (Replace: ^s with space)
    5.        Replace (2) spaces with (1) space (only run one time).
    6.        Clear all tab stops
    7.        Ensure that there is only one blank paragaph break between each item (text, table, etc.), remove extra breaks as necessary.
    8.        Remove right margin 

    I have office 2013 and Visual Studio 2015 installed on my machine.

    I have a hard time figuring out from past 8 hours, which objects/APIs help me in accomplishing these tasks. the only sample that i got is Office.context.document.getSelectedDataAsync

    Can anyone help me start on the right foot? I am also open to developing a windows or web add-in. 

    Thanks,

    Lavanya


    Thursday, February 4, 2016 4:30 PM

Answers

  • Hi Lavanya,

    From the description above, it seems you more instead in automate the Word application instead of interact the data with your add-in.

    So I suggest that you developing an VSTO add-in instead of Office add-in( apps for Office). And here are some materials to help you get started developing with VSTO:

    Create VSTO Add-ins for Office by using Visual Studio

    Word Solutions

    And to get familiar with Word object model quickly to automate the Word application, we can record the macros to get a demo code to quick start.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by lchigurupati Monday, February 8, 2016 5:15 PM
    Friday, February 5, 2016 2:20 AM
    Moderator

All replies

  • Hi Lavanya,

    From the description above, it seems you more instead in automate the Word application instead of interact the data with your add-in.

    So I suggest that you developing an VSTO add-in instead of Office add-in( apps for Office). And here are some materials to help you get started developing with VSTO:

    Create VSTO Add-ins for Office by using Visual Studio

    Word Solutions

    And to get familiar with Word object model quickly to automate the Word application, we can record the macros to get a demo code to quick start.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by lchigurupati Monday, February 8, 2016 5:15 PM
    Friday, February 5, 2016 2:20 AM
    Moderator
  • Thank you for the links. It helps me get started on right foot this time. 
    Friday, February 5, 2016 9:24 PM