Solved

How do I create word document templates for automated ooxml editing?

Posted on 2015-02-16
2
43 Views
Last Modified: 2016-06-15
My application needs to create a richly formatted Word document for the user. The process starts with two documents:

1.A Word document template.
2. A Word document that serves as a ‘database’ of paragraphs that can be added to the template document based on user input.
Based on user input, the selected paragraphs will be copied into the Word template creating a final Word document.

I think the needs are:

1. Create Word Templates with 'tagged' regions. Say, some sort of tag in the template serves as a target for the first paragraph selected by the user.
2. Code to find the 'tags' in the Word template and replace with formatted text from the 'database' word document.
3. Could anyone suggest how to 'tag' regions of the Word Template that can then be easily found programmatically?

Thanks, Matt
0
Comment
Question by:mattjankowski
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 40612347
If you don't have to support Word versions earlier than 2007, then Content Controls can provide your target markers

Consider using saving the paragraphs in the Autotext gallery of the template's Building Blocks, but if the formatted text must be easily visible during selection, then bookmarks would be the way of 'tagging' regions.
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 41655267
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: GrahamSkan (https:#a40612347)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

MacroShadow
Experts-Exchange Cleanup Volunteer
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question