Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2018, 08:43 PM
zixuan zixuan is offline Underlining Certain texts within a paragraph Windows 8 Underlining Certain texts within a paragraph Office 2007
Novice
Underlining Certain texts within a paragraph
 
Join Date: Jan 2018
Posts: 4
zixuan is on a distinguished road
Default Underlining Certain texts within a paragraph

Hi all!

I've got a cell within a table, and within those cells are bullets as such:
  • In particular to Teachers Bullying (Dec): 122/12/11
  • In particular to Staff Physical (Nov): 111/21/23
  • Recurring feedback on Staff Physical (Nov): 111/21/23



So what I'd like to do is to underline everything between In particular to and ":"

Im putting the entire cell into a For Each objParagraph In Selection.Range.Paragraphs loop, after which I did calculations to get the Starting & Ending index(Int) to underline per paragraph/bullet(Via Len() function). However I do not know how to manipulate these range or underline where range is between Starting & Ending.

Kindly seeking your assistance :/ sorry for bad english haha
*Sorry I've got no codes to show, my work is within a VPN Environment & extremely difficult to extract as such.
Reply With Quote
  #2  
Old 01-10-2018, 09:36 PM
macropod's Avatar
macropod macropod is offline Underlining Certain texts within a paragraph Windows 7 64bit Underlining Certain texts within a paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

You don't need a macro for that. It can all be done with a wildcard Find/Replace, where:
Find = In particular to [!:]@:
Replace = ^&
with the Replace formatted to apply underlining.

To access the wildcard and formatting Find/Replace options, click on the Find/Replace dialog's 'More' button.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-10-2018, 10:25 PM
zixuan zixuan is offline Underlining Certain texts within a paragraph Windows 8 Underlining Certain texts within a paragraph Office 2007
Novice
Underlining Certain texts within a paragraph
 
Join Date: Jan 2018
Posts: 4
zixuan is on a distinguished road
Default

Sorry!! I see haha, that's how its done, however I'm not very familiar with that :x

Are there examples I may be able to refer to ?
Reply With Quote
  #4  
Old 01-10-2018, 10:48 PM
macropod's Avatar
macropod macropod is offline Underlining Certain texts within a paragraph Windows 7 64bit Underlining Certain texts within a paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Have you actually tried doing the wildcard Find/Replace? It's not exactly rocket science...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 01-11-2018, 02:00 AM
zixuan zixuan is offline Underlining Certain texts within a paragraph Windows 8 Underlining Certain texts within a paragraph Office 2007
Novice
Underlining Certain texts within a paragraph
 
Join Date: Jan 2018
Posts: 4
zixuan is on a distinguished road
Default

I've done the codes as your suggestion, seems to work now...

I'm just stuck with the second part about replace :/ i dont really know how to do the replace ... So sorry.
However, thank you so much for the help! (Y) *bumps*
Reply With Quote
  #6  
Old 01-11-2018, 05:25 AM
macropod's Avatar
macropod macropod is offline Underlining Certain texts within a paragraph Windows 7 64bit Underlining Certain texts within a paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

I have given both the Find expression and the Replace expression and I've told you how to use them. It's a bit rich, then, for you to say "i dont really know how to do the replace".
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 01-11-2018, 06:45 PM
zixuan zixuan is offline Underlining Certain texts within a paragraph Windows 8 Underlining Certain texts within a paragraph Office 2007
Novice
Underlining Certain texts within a paragraph
 
Join Date: Jan 2018
Posts: 4
zixuan is on a distinguished road
Default

hahaha, I've done research and managed to solve it. Apologies, I'm really new to this!!
Reply With Quote
Reply

Tags
macro, word vba highlight text

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Underlining Certain texts within a paragraph Word 2013. Automatically underlining ukthesis Word 2 02-28-2016 03:26 AM
Underlining Certain texts within a paragraph Underlining a Phrase causes the whole document to be underlined goldye Word 1 01-28-2015 02:08 PM
Underlining Certain texts within a paragraph Stop underlining pasted data LarryStroup PowerPoint 5 01-11-2012 12:47 PM
Underlining Certain texts within a paragraph Word 2011 underlining wintercs Word 1 09-24-2011 07:20 AM
Underlining Certain texts within a paragraph Underlining in black under different colors 87bob Word 2 04-21-2010 03:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft