Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
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, 8 views)
Reply With Quote
  #2  
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: 22,465
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
Reply



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 09:42 PM.


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