Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9309711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:56:05+00:00 2026-06-19T00:56:05+00:00

What I would like to do is to be able to write some hidden

  • 0

What I would like to do is to be able to write some hidden marks in the document, so that when the user fills in some information, then I can process each part of the document according to the marks or sections that surrounded it. I’m using .NET, any ideas? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:56:06+00:00Added an answer on June 19, 2026 at 12:56 am

    Take a look at SdtElements tag, OpenXml Sdk and Word 2007 Content Control Toolkit

    The essence is:

    • Create a Word document that will be your template
    • In Word, turn on Developer tab
    • In the Developer tab there is a Controls group. Click the “Aa” ones to insert a new content tag, click “Properties” to edit the tag alias and data, turn on Design Mode to see the content tags

    The steps below apply if your app can output an XML you would bind to your document:

    • Open the Word Content Control Toolkit
    • Open the document you created
    • Attach an xml in the right-side panel
    • double-click on content tags to edit their XPath binding or use drag-drop; see WCCT manual for that

    Once you have your template prepared, depending on your actual task at hand you can do many things with these content tags, including:

    • replace the custom xml part in your document to update the data users will see when they open it
    • use openxml sdk to replace the data without opening it in Word
    • use the template to collect data (possible but unreliable, not recommended)
    • delete and insert content tags from code via openxml sdk

    In your code you can find the content tags by using LINQ queries over OpenXmlSdk objects like so:

    var contentTags = document.MainDocumentPart.Document.Body
                    .Descendants<SdtElement>()
                    .Where(x => x.SdtProperties.GetFirstChild<Tag>() != null && x.SdtProperties.GetFirstChild<DataBinding>() != null)
                    .Select(x => x.SdtProperties.GetFirstChild<Tag>().Val.InnerText =="Whatever Tag you're looking for or other condition to match several")
                    .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to write some sort of API such that I can call
Hi I would like to write some kind of dashboard. You should be able
I would like to write some integration test for my application. I wasn't able
I would like to be able to write some R code in markdown (including
I would like to be able to write: cout << enumalpha << Monday; and
I would like to be able to write something like char f(char); vector<char> bar;
I'm writing a blackjack program and would like to be able to write the
I'm running Ubuntu 11.10 and I would like to be able to write to
I would like to be able to dynamically read and write audio data in
I would like to be able to create a variable that holds an instance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.