Solved

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

Posted on 2015-02-16
2
28 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
Comment Utility
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 26

Expert Comment

by:MacroShadow
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now