?
Solved

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

Posted on 2015-02-16
2
Medium Priority
?
59 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

801 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