#16
|
|||
|
|||
Yes. The last choice must be done automatically. It cannot read your mind and tell that it is the last choice. In the document, I assign the keyboard shortcut Ctrl+Alt+A to trigger it. |
#17
|
|||
|
|||
Also, if you enter an empty answer, Word will automatically convert to the Question style and give you a new number. However, the keep-with-next formatting is still applied to the last answer. This will cause pagination problems at some point. It is preferable to apply the last answer style to the last answer. Again, in this document, that can be done with the keyboard shortcut Ctrl+Alt+A.
That breaks the keep-with-next chain so that the next question can start a new page (or column) if this is needed to keep questions and answers together. |
#18
|
|||
|
|||
Got it; it is awesome! but how to convert all last chocies to 'last answer style' automatically; given that I have now empty paragraph
|
#19
|
|||
|
|||
Quote:
wonderful forum; thanks all |
#20
|
|||
|
|||
You are welcome.
|
#21
|
||||
|
||||
Yes, but that is only so because the macro I wrote reformats the document that way. Although I agree that having an empty paragraph is generally undesirable, one also has to weigh up the benefits against the risks. In this case, if anyone else comes along to edit the document, having the empty paragraph between questions is far more obvious than having two different 'answer' Styles. Imagine what might happen when a new user starts copying & pasting answers to use as 'templates' for new question/answer sets and doesn't appreciate the subtleties... What do you suppose might happen if a paragraph in the 'last answer style' is deleted or duplicated!
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#22
|
|||
|
|||
Quote:
Could do your code in Macro with find/replace Tried on attached document. 1. Find Question_Style and replace it with ^p^& 2. Find ^p^p and replace it with ^p###^p 3. Change ### to be in normal style 4. Replace ### to nothing! Find/Replace is powerful! Looked at your forum posts; wish to be competent in Macro; I've some programming background but I know nothing in VBA; from where do you suggest me to begin? any online tutorial/video/etc?? |
#23
|
||||
|
||||
Indeed. And your approach could likewise be turned into a macro.
There are some useful texts on VBA programming you might read, published by companies like O'Reilly Media & XML Press, but I haven't read any such publications in recent years and, so, don't know what's current. Most such texts are for Access & Excel, though - few pay much serious attention to Word.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#24
|
|||
|
|||
Quote:
This is old but well written; vba has not changed, the things word can do has changed. Graham Mayor's site has some good code examples. VBA Code Examples (3) |
#25
|
|||
|
|||
Quote:
What do you suppose might happen if someone tries editing a document fixed with your macro or create a new test from copied questions and answers. They will be stuck in the original spot. Yes, an empty paragraph is more intuitive than styles or using a wildcard replace or using a macro. You are correct that a find-replace without the empty paragraph would be difficult. A macro would be required without it to repair an existing document. That is why I said that it would work if there was an empty paragraph. The styles are intended to be used to start a new test. Once they are in place they work very well. It makes it easy to rearrange question sets. Any yes, I expect that people will use styles. It is a basic Word skill. I recognize that this expectation is faulty. Most Word users know little of styles. I keep trying. |
#26
|
||||
|
||||
I expect it will work exactly the same way as all the other questions because, regardless of how many 'answers' they have, all answers will be in the same Style. I can't see how you'd think they'd be stuck anywhere.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trying to add space between lines of bulleted text and a new header but both lines are moving??? | Martin_d35 | Word | 2 | 02-10-2017 07:13 AM |
First Lines | dlapham9 | Word | 1 | 10-26-2016 07:23 PM |
Deleting grid lines but keeping the axis lines | CoffeeNut | Excel | 0 | 04-01-2013 01:50 PM |
Can't get rid of lines. | gfswolf | Word | 6 | 01-02-2012 02:33 PM |
Getting blank lines instead of supressed lines. | Welshie82 | Mail Merge | 2 | 11-14-2011 01:41 AM |