Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a Word file that stores data. There is a heading then usually at least three lines that have the same descriptor but often there are many more lines of data. The lines are too disparate for Find and Replace to work well. I wish to avoid manually editing the document so it becomes XML but see little choice. Is there an alternative way?

There has to be a structure to the data, otherwise, you're going to have to do it by hand.

If a heading is denoted by a certain style (like Heading1), then you can look for that style and anything between that style, you can read as being under that heading.

Without structure in the original file, how would you suggest writing code to create that structure?

There is always a way, but you have to be able to tell the program how to pull out the information.
Share this answer
Thanks. This is as I thought, but I asked the question just in case. I think it is a case of manually copying and pasting.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900