Extract Bullets and Tables information in Word doc from c#

Posted by Siva on Stack Overflow See other posts from Stack Overflow or by Siva
Published on 2010-06-14T10:04:55Z Indexed on 2010/06/14 10:32 UTC
Read the original article Hit count: 169

Filed under:
|
|

Hi All,

I need to create an word document based on the template in c#. I have tags for only the paragraphs. Is there any way to replace the bullets and tables that are already available in the template based on the user input.

I was able to replace the paragraph with input text using the Replace command in the Word InterOp.

Need help to do the rest of the items.

  1. Replace the bullets based on the user input
  2. Fill the tables with the input values

Code for replacing the Paragraph based on the tag:

FindAndReplace(wordApplication, "/date/", DateTime.Now.Date.ToString("MMM dd, yyyy"));

FindAndReplace(){

    wordApplication.Selection.Find.Execute(ref findText,
            ref matchCase, ref matchWholeWord, ref matchWildCards, ref matchSoundsLike,
            ref matchAllWordsForms, ref forward, ref wrap, ref format, ref replaceWithText, ref replace, ref matchKashida,
            ref matchDiacritics, ref matchAlefHamsa, ref matchControl);

}

Thanks in Advance. ASAP

© Stack Overflow or respective owner

Related posts about c#

Related posts about interop