Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-28-2015, 07:11 PM
Guessed's Avatar
Guessed Guessed is offline Bolding in script Windows 7 32bit Bolding in script Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You don't need to bother with a search and replace if you make use of the selection.expand method. For instance, you could add the following in front of the End If line
Code:
  Dim oPar As Paragraph
  For Each oPar In oRng.Paragraphs
    oPar.Range.Select
    Selection.Collapse Direction:=wdCollapseStart
    Selection.Extend " "
    Selection.Font.Bold = True
  Next oPar
This would be much slicker if you could use the range directly and didn't need the selection object but I don't think extend works for ranges.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with VBA script nsyrax Word VBA 1 01-18-2014 03:38 AM
Bolding in script Outlook Script Help TheInfinetGroup Outlook 1 03-02-2013 07:43 AM
Add Shared Calendar using script Antros Outlook 0 03-15-2012 01:01 PM
Bolding in script Script Doesn't works on other machine ravininave Word 1 01-05-2011 01:45 PM
[ask] about VB Script + Ms. Project anak_baru Project 2 03-10-2009 01:42 AM

Other Forums: Access Forums

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