Solved

how do I loop through individual words in a paragraph using MS Word vba

Posted on 2012-12-24
2
493 Views
Last Modified: 2012-12-24
how do I loop through individual words in a paragraph using MS Word vba
0
Comment
Question by:Dov_B
2 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 38719609
Here's one way to do that:

Sub WordLoop()
Dim wr as Range
    For each wr in ActiveDocument.Words
        'Enter your code here
    Next wr
End Sub

Flyster
0
 

Author Closing Comment

by:Dov_B
ID: 38719633
Thanks a gazillion!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn't always work and documents are still printed. With this simple solution, if the user tries to …
The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now