Discussion:
numbering and lists
(too old to reply)
k***@gmail.com
2015-06-23 09:43:33 UTC
Permalink
I would appreciate the group's assistance with a macro that I can use in formatting a quiz.

I have text in the following format:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx

First sentence (the question) is followed by four answer options. I would like the macro to go through the document converting the text to the following format.

1. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx

2. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx

My attempts to do this have been singularly unsuccessful.

Thank you for any assistance you can provide.

My email address is: OverlandParkJoe at Gmail.com
Barry Schwarz
2015-06-23 17:14:13 UTC
Permalink
Is each set ALWAYS exactly 6 lines?
Post by k***@gmail.com
I would appreciate the group's assistance with a macro that I can use in formatting a quiz.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
First sentence (the question) is followed by four answer options. I would like the macro to go through the document converting the text to the following format.
1. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx
2. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx
My attempts to do this have been singularly unsuccessful.
Thank you for any assistance you can provide.
My email address is: OverlandParkJoe at Gmail.com
--
Remove del for email
k***@gmail.com
2015-06-23 18:23:08 UTC
Permalink
Post by Barry Schwarz
Is each set ALWAYS exactly 6 lines?
Post by k***@gmail.com
I would appreciate the group's assistance with a macro that I can use in formatting a quiz.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
First sentence (the question) is followed by four answer options. I would like the macro to go through the document converting the text to the following format.
1. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx
2. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx
My attempts to do this have been singularly unsuccessful.
Thank you for any assistance you can provide.
My email address is: OverlandParkJoe at Gmail.com
--
Remove del for email
Thank you Barry for reading my post. It is one sentence (which may be one or more lines) followed by either 2 or 4 options. In short, not always six lines.
What separates one group from another is two end-of-paragraph in sequence.
Barry Schwarz
2015-06-23 23:04:46 UTC
Permalink
Post by k***@gmail.com
Post by Barry Schwarz
Is each set ALWAYS exactly 6 lines?
Post by k***@gmail.com
I would appreciate the group's assistance with a macro that I can use in formatting a quiz.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
First sentence (the question) is followed by four answer options. I would like the macro to go through the document converting the text to the following format.
1. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx
2. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a. xxxxxxxxxx
b. xxxxxxxxxx
c. xxxxxxxxxx
d. xxxxxxxxxx
My attempts to do this have been singularly unsuccessful.
Thank you for any assistance you can provide.
My email address is: OverlandParkJoe at Gmail.com
--
Remove del for email
Thank you Barry for reading my post. It is one sentence (which may be one or more lines) followed by either 2 or 4 options. In short, not always six lines.
What separates one group from another is two end-of-paragraph in sequence.
I assume your sentence and each otpion is terminated with a ¶. I also
assume there is a ¶ prior to the first question and a double ¶ after
the last option.

Create two list styles. The first (level 1) uses 1, 2, 3. The second
(level 2) uses a, b, c and resets after a level 1. Other style
options (e.g., indenting) are up to you.

Position just before the ¶ prior to the first question.

Loop 1
Select next paragraph (terminate loop if no more)
Assign level 1 style to paragraph.
Loop 2
Select next paragraph
If empty, exit loop 2
Assign level 2 style to paragraph
Iterate loop 2
Iterate loop 1

Obviously, test on a small sample of data before running for real.
--
Remove del for email
k***@gmail.com
2015-06-24 12:41:48 UTC
Permalink
Thank you, Barry. I will give it a try.
I did not consider the option of using two separate lists.
Appreciate your taking the time.
Best.
I assume your sentence and each otpion is terminated with a ś. I also
assume there is a ś prior to the first question and a double ś after
the last option.
Create two list styles. The first (level 1) uses 1, 2, 3. The second
(level 2) uses a, b, c and resets after a level 1. Other style
options (e.g., indenting) are up to you.
Position just before the ś prior to the first question.
Loop 1
Select next paragraph (terminate loop if no more)
Assign level 1 style to paragraph.
Loop 2
Select next paragraph
If empty, exit loop 2
Assign level 2 style to paragraph
Iterate loop 2
Iterate loop 1
Obviously, test on a small sample of data before running for real.
--
Remove del for email
d***@gmail.com
2015-06-25 20:13:21 UTC
Permalink
I recommend that you first create Styles to meet your formatting requirements. Then, if you are able to create a macro (VBA) that selects your text based on specific formatting you can have the macro apply your styles to the selection.

It is likely overkill to spend the time to create a macro for a few Quiz documents. Much easier to just import the text into a template with the required Styles and manually apply. Unless you have at least 25 legacy Quizzes' in raw text format to update into Quiz format. In the future just use the custom template I created and sent to you and then develop your Quiz using the Outline view or by selecting the custom styles I created.

Dennis
k***@gmail.com
2015-06-26 14:38:48 UTC
Permalink
Post by d***@gmail.com
I recommend that you first create Styles to meet your formatting requirements. Then, if you are able to create a macro (VBA) that selects your text based on specific formatting you can have the macro apply your styles to the selection.
It is likely overkill to spend the time to create a macro for a few Quiz documents. Much easier to just import the text into a template with the required Styles and manually apply. Unless you have at least 25 legacy Quizzes' in raw text format to update into Quiz format. In the future just use the custom template I created and sent to you and then develop your Quiz using the Outline view or by selecting the custom styles I created.
Dennis
Dennis:
Thank you for taking the time to advise me. You mention a template you sent. I have not received anything. My gmail address is kansaskannan@ ....
Thank you.
Kannan

Loading...