![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Nov 2008
Posts: 1
OS: Windows XP SP3
|
- Is there any way to do a macro in Word that would find all the words between quotation marks and either underline and/or make them bold?Thanks! |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: May 2008
Location: Baltimore, Maryland
Posts: 160
OS: Windows XP SP3
|
Re: Macro for Word
Here is some code I threw together quickly. It underlines words contained within quotation marks. The code could use a little work, though, so go ahead and make improvements as you see fit!
Code:
Sub Underline()
Dim idx As Long
Do While idx < ActiveDocument.Words.Count
idx = idx + 1
Select Case Trim(ActiveDocument.Words(idx))
Case Chr(147), Chr(148), Chr(34)
If Not ((idx + 2) > ActiveDocument.Words.Count) Then
Select Case Trim(ActiveDocument.Words(idx + 2))
Case Chr(147), Chr(148), Chr(34)
ActiveDocument.Words(idx + 1).Underline = wdUnderlineSingle
idx = idx + 1
End Select
End If
End Select
Loop
End Sub
|
|
|
|
![]() |
| Thread Tools | |
|
|