Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-27-2018, 08:31 AM
pentagram_31 pentagram_31 is offline A few macros or functions run in a single macro? Windows 7 32bit A few macros or functions run in a single macro? Office 2013
Novice
A few macros or functions run in a single macro?
 
Join Date: Feb 2015
Posts: 13
pentagram_31 is on a distinguished road
Default A few macros or functions run in a single macro?

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.
Reply With Quote
 

Tags
macro multiple functions

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
A few macros or functions run in a single macro? Infinite loops occurring in find and replace functions in word macro Thefirstfish` Word VBA 5 04-06-2017 07:18 PM
A few macros or functions run in a single macro? Why are my Macros combined into a single module? Cyberseeker Excel Programming 1 04-02-2017 02:43 AM
A few macros or functions run in a single macro? Creating a "super macro" with all kind of functions Xanthopteryx PowerPoint 1 06-16-2016 01:38 AM
A few macros or functions run in a single macro? what functions would this task use, format, macro ? etc fremoy Word 2 02-16-2015 10:48 AM
A few macros or functions run in a single macro? Macro to save to a single PDF LukeExcelKid Excel Programming 4 11-17-2013 01:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:13 AM.


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