![]() |
#1
|
|||
|
|||
![]()
Hi everyone, I need to run multiple functions in a single macro. Let me tell you about it with an example:
1- Paul found it much easier to use a pencil for taking notes as he could .......... mistakes, which he made plenty of, very easily. A) type B) erase C) deter D) furnish E) release 2- You have to watch that market trader very ...........; otherwise, he will sneakily throw a few rotten oranges in amongst the good ones. A) closely B) secretly C) violently D) daringly E) placidly 3- The-Portuguese water dog is one of several.......... of dog used by fishermen around the world to retrieve lost nets and tackle from the water. A) series B) descriptions C) breeds D)races E) ranks I have a lot of test questions/entries like this. I want to make each question (without options) a single paragraph and make them bold. Also there is an empty line between some of the questions, but not all of them, so the macro should take care of it, too. Needless to say, the macro should do its job from the beginning to the end of a document. Currently I use a macro to make the questions bold, but this macro only make one paragraph/line of "A)", so I need to add a function to make the lines into a single paragraph. What I'm using right now: Code:
Sub root() ' ' root Makro ' ' Selection.Find.ClearFormatting Selection.GoTo What:=wdGoToHeading, Which:=wdGoToFirst With Selection.Find .Text = "A)" .Forward = True '.Wrap = wdFindContinue .Format = False .MatchCase = True .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Do While Selection.Find.Execute If Selection.Find.Found = True Then Selection.MoveUp Unit:=wdParagraph, Count:=3, Extend:=wdExtend Selection.Font.Bold = wdToggle Selection.MoveDown Unit:=wdParagraph, Count:=2 End If Loop End Sub Last edited by pentagram_31; 10-27-2018 at 08:35 AM. Reason: I want to clarify sth. |
Tags |
macro multiple functions |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Thefirstfish` | Word VBA | 5 | 04-06-2017 07:18 PM |
![]() |
Cyberseeker | Excel Programming | 1 | 04-02-2017 02:43 AM |
![]() |
Xanthopteryx | PowerPoint | 1 | 06-16-2016 01:38 AM |
![]() |
fremoy | Word | 2 | 02-16-2015 10:48 AM |
![]() |
LukeExcelKid | Excel Programming | 4 | 11-17-2013 01:39 PM |