none
c# code to search text/string in word doc and get page number RRS feed

  • General discussion

  • I am using Visual studio 2005.My project is window application and using c# language. We are having word templates created in office 2003, 2007 and 2010.

    I want to search text (string) in word template (.dot/.doc/.docx).This text/string is exist in two places in word doc :

    1) table

    Question Title

    Issue no

    Change description

    Page no

    Title

    Modified By

    date

    «QUESTION_TITLE»

    «Issue_no»

    xyz

    «QUESTION_MODIFICATION_NAME»

    «QUESTION_MODIFICATION_DATE»

    2) title/subtitle

    1.2.1 xyz

    I want the page no and title/subtitle to copy into table.

    For an example table is exist on page 1 and having column value as xyz. Title/Subtitle 1.2.1 is exist on page no 3 with value xyz.

    Now I want to update table by page no and title/subtitle:

    Question Title

    Issue no

    Change description

    Page no

    Title

    Modified By

    date

    «QUESTION_TITLE»

    «Issue_no»

    «QUESTION_MODIFICATION_DESCRIPT»

    3

    1.2.1

    «QUESTION_MODIFICATION_NAME»

    «QUESTION_MODIFICATION_DATE»

    I am not able to find c# code to search text/string in word doc and modify table with page no and title in word doc.

    Please help me to find c# code.


    Nitin Varshneya

    Monday, November 19, 2012 4:01 PM

All replies

  • Ntin --
     
    You have erroneously posted your question in a public forum dedicated to questions about Microsoft Project, a project management application.  I would recommend you repost your question in a forum related to programming in Microsoft Word.  Hope this helps.
     

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    Monday, November 19, 2012 4:12 PM
    Moderator