Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-30-2015, 03:08 PM
marymaryt marymaryt is offline Creating macro in 2007 to bold within quotes on the fly Windows 7 64bit Creating macro in 2007 to bold within quotes on the fly Office 2007
Novice
Creating macro in 2007 to bold within quotes on the fly
 
Join Date: May 2015
Posts: 2
marymaryt is on a distinguished road
Exclamation Creating macro in 2007 to bold within quotes on the fly


Hi - I am trying to create a macro so far unsuccessfully. I type reports for doctors and in the reports they quote the patient and he wants the statement of the patient bolded and then end quote not bolded. I want to be able to do this on the fly without having to type the whole report and then go back and search for all the statements he wanted bolded in quotes. So he will say for example, the patient says beginning quote bold I am having difficulty in this area unbold end quote.

Is there any way I can do this so as soon as I hear him say quote bold, have a keyboard macro for it right then? I have tried all afternoon to figure one out. Just not my forte....thanks for any help.
Reply With Quote
  #2  
Old 05-30-2015, 06:55 PM
gmaxey gmaxey is offline Creating macro in 2007 to bold within quotes on the fly Windows 7 32bit Creating macro in 2007 to bold within quotes on the fly Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

I don't understand what you are looking for. There is already a built-in command to toggle bold on an off (Ctrl+b). So when the doctor says quote bold your type " and press CTRL+b and keep typing. When he says unbold quote you type Ctrl+b and "

What am I missing?
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 05-31-2015, 09:34 AM
marymaryt marymaryt is offline Creating macro in 2007 to bold within quotes on the fly Windows 7 64bit Creating macro in 2007 to bold within quotes on the fly Office 2007
Novice
Creating macro in 2007 to bold within quotes on the fly
 
Join Date: May 2015
Posts: 2
marymaryt is on a distinguished road
Default

Hi: I know if have a toggle ctrl b for bold, I am looking for a macro that will put the beginning quotes, the bolded statement and the ending quotes as a keyboard command, all in one, because he does many many quoting and bolding in long sentences, one right after the other, that I have stop, take my fingers off the keyboard, use the Ctrl B and then Ctrl B to unbold and then to end quote. Thought there would be an easier way using a macro to do the above at once. Do you understand what I am trying to do?
Reply With Quote
  #4  
Old 05-31-2015, 11:57 AM
gmaxey gmaxey is offline Creating macro in 2007 to bold within quotes on the fly Windows 7 32bit Creating macro in 2007 to bold within quotes on the fly Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Mary,

No I don't understand. From what I can gather you are typing something that has been dictated. The doctor says "quote bold the patients knee bone is connected to the elbow bold unquote and then you type " ctrl b the patient's knee bone is connected to the elbow ctrl+b " How is any macro suppose to know what you are going to type after the first " ctrl + b?

Obviously I don't understand what your process is and until I do I won't be able to help.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 05-31-2015, 08:57 PM
gmayor's Avatar
gmayor gmayor is offline Creating macro in 2007 to bold within quotes on the fly Windows 7 64bit Creating macro in 2007 to bold within quotes on the fly Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Quote:
Originally Posted by marymaryt View Post
I have stop, take my fingers off the keyboard, use the Ctrl B and then Ctrl B to unbold and then to end quote.
'Ctrl' & 'B' are on your keyboard, where are you taking your fingers to?

A macro would require a different keyboard shortcut, or a button. How would that be an advantage? But if you insist, the macro recorder will do the job.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #6  
Old 06-01-2015, 06:55 AM
gmaxey gmaxey is offline Creating macro in 2007 to bold within quotes on the fly Windows 7 32bit Creating macro in 2007 to bold within quotes on the fly Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

If I assume that you are starting with existing text like:


This is quote bold test test test unbold end quote.This is quote bold test test test unbold end quote.

The maybe something like this is what you are after"

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "quote bold*unbold end quote"
    .MatchWildcards = True
    While .Execute
      oRng.Words.First.Delete
      oRng.Words.First.Delete
      oRng.Words.Last.Delete
      oRng.Words.Last.Delete
      oRng.Words.Last.Delete
      oRng.Bold = True
      oRng.InsertBefore """"
      oRng.InsertAfter """"
      oRng.Characters.Last.Bold = False
      oRng.Collapse wdCollapseEnd
    Wend
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating macro in 2007 to bold within quotes on the fly How to replace straight quotes with smart quotes in existing document PABwriter Word 4 05-27-2016 03:36 PM
Creating macro in 2007 to bold within quotes on the fly macro to add brackets to each line and add single quotes to each word in the line bracketandquotes Word VBA 17 02-16-2015 03:51 PM
Creating macro in 2007 to bold within quotes on the fly macro to format selected text with curly quotes ysostarman Word VBA 10 11-11-2014 12:51 PM
Macro Needed to bold specific lines and Macro to turn into CSV anewteacher Word VBA 1 05-28-2014 03:59 PM
Creating macro in 2007 to bold within quotes on the fly Changing single-quotes to double-quotes Bobosmite Word 5 04-15-2013 06:40 AM

Other Forums: Access Forums

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