Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 03-24-2018, 07:22 AM
Charles Kenyon Charles Kenyon is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default


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.
Reply With Quote
  #17  
Old 03-24-2018, 07:24 AM
Charles Kenyon Charles Kenyon is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #18  
Old 03-24-2018, 07:29 AM
sarah2020 sarah2020 is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2016
Novice
Paging [keep lines together; keep with next]
 
Join Date: Mar 2018
Posts: 15
sarah2020 is on a distinguished road
Default

Got it; it is awesome! but how to convert all last chocies to 'last answer style' automatically; given that I have now empty paragraph
Reply With Quote
  #19  
Old 03-24-2018, 08:06 AM
sarah2020 sarah2020 is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2016
Novice
Paging [keep lines together; keep with next]
 
Join Date: Mar 2018
Posts: 15
sarah2020 is on a distinguished road
Default

Quote:
Originally Posted by sarah2020 View Post
Got it; it is awesome! but how to convert all last chocies to 'last answer style' automatically; given that I have now empty paragraph
done; using some find/replace

wonderful forum; thanks all
Reply With Quote
  #20  
Old 03-24-2018, 03:02 PM
Charles Kenyon Charles Kenyon is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You are welcome.
Reply With Quote
  #21  
Old 03-24-2018, 11:17 PM
macropod's Avatar
macropod macropod is offline Paging [keep lines together; keep with next] Windows 7 64bit Paging [keep lines together; keep with next] Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Charles Kenyon View Post
Assuming you currently have an empty paragraph between questions and nowhere else, you can use a replacement.
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]
Reply With Quote
  #22  
Old 03-25-2018, 01:41 AM
sarah2020 sarah2020 is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2016
Novice
Paging [keep lines together; keep with next]
 
Join Date: Mar 2018
Posts: 15
sarah2020 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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!
Was playing with Find/Replace today
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??
Attached Files
File Type: docx TestingReplace.docx (12.7 KB, 6 views)
Reply With Quote
  #23  
Old 03-25-2018, 04:04 AM
macropod's Avatar
macropod macropod is offline Paging [keep lines together; keep with next] Windows 7 64bit Paging [keep lines together; keep with next] Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by sarah2020 View Post
Find/Replace is powerful!
Indeed. And your approach could likewise be turned into a macro.
Quote:
Originally Posted by sarah2020 View Post
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??
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]
Reply With Quote
  #24  
Old 03-25-2018, 06:38 AM
Charles Kenyon Charles Kenyon is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
I've some programming background but I know nothing in VBA; from where do you suggest me to begin? any online tutorial/video/etc?
Writing Word Macros: An Introduction to Programming Word using VBA: PhD Steven Roman
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)
Reply With Quote
  #25  
Old 03-25-2018, 06:55 AM
Charles Kenyon Charles Kenyon is offline Paging [keep lines together; keep with next] Windows 10 Paging [keep lines together; keep with next] Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by macropod View Post
*** 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!
If someone copies and pastes a set of question and answers from one document to another, if they copy original formatting, the styles, complete with numbering, transfer into the new document.

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.
Reply With Quote
  #26  
Old 03-25-2018, 01:24 PM
macropod's Avatar
macropod macropod is offline Paging [keep lines together; keep with next] Windows 7 64bit Paging [keep lines together; keep with next] Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Charles Kenyon View Post
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.
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]
Reply With Quote
Reply

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
Paging [keep lines together; keep with next] 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
Paging [keep lines together; keep with next] Can't get rid of lines. gfswolf Word 6 01-02-2012 02:33 PM
Paging [keep lines together; keep with next] Getting blank lines instead of supressed lines. Welshie82 Mail Merge 2 11-14-2011 01:41 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft