Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2014, 05:23 AM
rsrasc rsrasc is offline Looking for Macro Windows 7 64bit Looking for Macro Office 2010 64bit
Competent Performer
Looking for Macro
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default Looking for Macro

I have a word document listing a series of True/False Questions (up to 49 questions-only included two (2) here for demonstration), and right after all the questions there are the answers to the questions. Please notice the questions are splitted/separated in two line
The way you see the information below is how it is copy and paste it from the source.
What I would like to have is to see if there is a way to automate the information with a macro.

Here is how the information in the document looks now.....
Question #1 (Q6955)
Here is the first question.
True
False
Question #2 (Q6954)
Here is the second question.
True
False

Question #1 :

True
Question #2 :



False
================================================== ============================
After the macro is applied, here is how the information should looks like:

1. Question #1 (Q6955)-Here is the first question.
A. True
B. False
Answer: A

2.Question #2 (Q6954)-Here is the second question.
A. True
B. False
Answer: B
==========================================

Hope someone can help me!

Thanks!
Reply With Quote
  #2  
Old 05-23-2014, 09:17 AM
JulieW JulieW is offline Looking for Macro Windows 7 64bit Looking for Macro Office 2010 32bit
Novice
 
Join Date: Apr 2014
Location: Canada
Posts: 12
JulieW is on a distinguished road
Default

Here is one way: you could do that with a very tiny macro if you set up the document with multilevel list styles.

level 1 style = Question
level 2 style = A, B
level 3 style = Answer:

All your macro need do is toggle the hidden text property of the level 3 style. There would be one modification if you wish to make it that easy. That is, for your level 1 paragraphs, include the text of the question inline with the same paragraph to avoid the need for a style separator or hidden paragraph mark. Hope this helps.
Reply With Quote
  #3  
Old 05-24-2014, 05:00 AM
rsrasc rsrasc is offline Looking for Macro Windows 7 64bit Looking for Macro Office 2010 64bit
Competent Performer
Looking for Macro
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default

I managed to get partial results using the find and replace option using an excel file but would like to have it in word.

I would like to have a simple macro to convert the following text from:

Question #1
Question #2
Question #3
...
Question #150


to the following:

1. Question #1
2. Question #2
3. Question #3
...
150. Question #150

Thanks!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
custom icon, undo/redo for macro, permanent macro Rapier Excel 0 08-05-2013 06:30 AM
How do I assign a macro to a button when the macro is in my personal workbook? foolios Excel Programming 2 07-27-2011 02:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:09 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