View Single Post
 
Old 08-14-2014, 01:00 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Tommes93 View Post
when the do while loop starts, it wont do it for only one cell or only the table. it goes through the whole document and changes every bold word.
That's because I didn't provide any code to limit the range. Without knowing more about your document, which you seem reluctant to provide, I can't do that; you'll have to do it yourself, using an InRange test, along the lines of:
Code:
Do While .Find.Found
    If .InRange(some predefined range) Then
     ' do stuff here
    Else: Exit Do
    End If
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote