1
votes

I have a word document with paragraphs which have different styles. This is the the sequence of the paragraphs with styles

Style Paragraph Text
st1 text1
st2 text2

st3 text3
st4 text4

The paragraph styles are linked ie. st1 and st2 are linked and st3 and st4, and always follow each other. This link is stored in a seperate xml file. I want to search the word document find the paragraphs by style, and make them one paragraph keeping style of the first paragraph. Any questions please ask. Thanks.

P.S Using W0rd Interop and C# .net 4

1

1 Answers

1
votes

I did a bit of research into this recently and found there has been a lot of work with regards to working with Microsoft Office with C#. The 'Open XML SDK Productivity Tool for Office' is amazing. You can open Office docs and look at all the C# to generate a document.

The Open XML SDK 2.5 for Microsoft Office tools package contains the Open XML SDK v2.5 Productivity Tool for Office and the hyperlink to documentation for the Open XML SDK 2.5. The Open XML SDK 2.5 Productivity Tool for Microsoft Office provides a number of features designed to improve your productivity and accelerate your learning while working with the SDK and Open XML files. Features include the ability to generate Open XML SDK 2.5 source code based on document content, compare source and target Open XML documents to reveal differences and to generate source code to create the target from the source, validate documents, and display documentation for the Open XML SDK 2.5 Classes, the ECMA376v1 standard, and the Microsoft Office implementation notes.

Open XML developer training workshop

Office2010 OpenXML SDK

Introduction to Open XML SDK 2.0: Solution Development - Part 2

Open XML SDK 2.0 for Microsoft Office OR Open XML SDK 2.5 for Microsoft Office (Not sure if 2.5 it's out of CTP yet)