PDA

View Full Version : Creating and selecting paragraphs - Data Extraction



MacroWizard
11-07-2015, 02:59 PM
Hello all!

I am new to the forums. I am working on a project and am wondering the best way to go about accomplishing a particular task.

A little about the project:

The project involves automating a client's training guide creation process. Training developers create training guides using a series of macro buttons. They use them to create tables and various content blocks.

The issue:

I am looking to create two separate types of content blocks by using the buttons in the attached image. The sole purpose of these content blocks is to be able to distinguish regular content from facilitator notes. The user will have the option when the guide is complete to press a button that says "Make participant guide" and basically the button will iterate through the regular content blocks and place them in a new document. This is a time-saving process. I am sure there are other ways to accomplish the automation of the participant guide, but I haven't thought of anything better.

The question:

How can i create a sort of content block that I can use code to iterate through later? It can be a form field that has a name set in an array (content(i) --> content1, content2, content3, etc)... or a special invisible tag <regularcontent>stuff here</regularcontent. That way I can either iterate through the content blocks or parse the content later.

What are your suggestions?

Thank you so much in advance. I'm a bit stumped on this.

gmayor
11-07-2015, 09:46 PM
Your requirement is hopelessly vague, but on the face of it you could insert named content controls, which are simple enough to access. You can find all you need to know about the use of content controls on Greg Maxey's web site (http://gregmaxey.mvps.org/word_tips.htm)

MacroWizard
11-08-2015, 09:00 AM
:thumb
Your requirement is hopelessly vague, but on the face of it you could insert named content controls, which are simple enough to access. You can find all you need to know about the use of content controls on Greg Maxey's web site<br>
<br>Thanks for the reply. I tried to keep the requirement pretty vague, because I need to either insert a tag that I can reference with vba later, or have the content in content controls, like multiline textboxes, which can easily be referenced later. I'll take a look at the website and see what I can dig up.

MacroWizard
11-08-2015, 09:56 AM
So I took a look at the site. I have decided to use traditional content controls. They have a tag feature that I think will suit my needs perfectly. My next question is, what do you think the best way to iterate through the controls is? I will need to go one by one, making a certain set of controls (with the same tag) invisible. Any hints there?