Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-10-2024, 11:35 AM
gmaxey gmaxey is offline VBA format plain quotes to bold quotes Windows 10 VBA format plain quotes to bold quotes Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word Macro coded by Gregory K. Maxey
Dim oRng As Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = Chr(34)
    .Font.Bold = False
    While .Execute
      oRng.Select
      On Error Resume Next
      If oRng.Characters.Last.Next.Font.Bold = True Then oRng.Font.Bold = True
      If oRng.Characters.Last.Previous.Font.Bold = True Then oRng.Font.Bold = True
    Wend
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem when changing single-quotes to double-quotes Lup Word 14 02-14-2020 02:46 AM
VBA format plain quotes to bold quotes How to replace straight quotes with smart quotes in existing document PABwriter Word 4 05-27-2016 03:36 PM
Changing dumb quotes to smart quotes Reisende Word 2 05-02-2016 08:56 PM
Creating macro in 2007 to bold within quotes on the fly marymaryt Word VBA 5 06-01-2015 06:55 AM
VBA format plain quotes to bold quotes 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 07:47 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