Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-25-2023, 11:15 AM
dhapp dhapp is offline Find string, Replace with dot tab Windows XP Find string, Replace with dot tab Office 2007
Novice
Find string, Replace with dot tab
 
Join Date: Jul 2010
Posts: 7
dhapp is on a distinguished road
Default Find string, Replace with dot tab

Is there a way to do a Find all occurrences of a string (e.g. "xxx") and Replace each of them with a right-justified dot tab?



Ex:
January 1, 2023xxxNew Years' Day
becomes
January 1, 2023.........................New Years Day

I can Find xxx and Replace with ^t but this results in a standard tab characters, and not dot tabs.

I suspect this will require some vba code, but am unfamiliar with vba in Word.

Thanks.
Reply With Quote
  #2  
Old 03-25-2023, 10:22 PM
Robert2 Robert2 is offline Find string, Replace with dot tab Windows 10 Find string, Replace with dot tab Office 2007
Competent Performer
 
Join Date: Jun 2013
Posts: 165
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

You can easily do it with Find/Replace.
Find xxx and Replace with ^t, but associate the Replace string with a tab format (use the Format drop-down of the Find/Replace dialog).
Reply With Quote
  #3  
Old 03-26-2023, 09:30 AM
dhapp dhapp is offline Find string, Replace with dot tab Windows XP Find string, Replace with dot tab Office 2007
Novice
Find string, Replace with dot tab
 
Join Date: Jul 2010
Posts: 7
dhapp is on a distinguished road
Default

Robert2
Thanks for responding. Your suggestion makes sense but I am unable to get it to work.
It inserts regular tab characters, not dot tabs. Any suggestions?

See Image

Doug
Attached Images
File Type: jpg XXX No Joy.jpg (104.7 KB, 11 views)
Reply With Quote
  #4  
Old 03-26-2023, 10:34 AM
Charles Kenyon Charles Kenyon is offline Find string, Replace with dot tab Windows 11 Find string, Replace with dot tab Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Create a paragraph style that contains the dot-tab setting.
You can add the style to the replace with box.
Reply With Quote
  #5  
Old 03-26-2023, 11:37 AM
Robert2 Robert2 is offline Find string, Replace with dot tab Windows 10 Find string, Replace with dot tab Office 2007
Competent Performer
 
Join Date: Jun 2013
Posts: 165
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

Quote:
Originally Posted by dhapp View Post
Robert2
Thanks for responding. Your suggestion makes sense but I am unable to get it to work.
It inserts regular tab characters, not dot tabs. Any suggestions?

See Image

Doug
You need to define the tab stop properties when the insertion cursor is in the Replace with box.
If you define the tab stop properties when the insertion cursor is in the Find box, it won't work.
Reply With Quote
  #6  
Old 03-27-2023, 07:23 AM
dhapp dhapp is offline Find string, Replace with dot tab Windows XP Find string, Replace with dot tab Office 2007
Novice
Find string, Replace with dot tab
 
Join Date: Jul 2010
Posts: 7
dhapp is on a distinguished road
Default

I discovered a different way to accomplish my goal.

Assuming a document that has lines of text that start with a business name, followed by the address and ending with a phone number, and I we want to put the dots tab before the phone number.

Determine the inch measurement of the leftmost digit of the phone number when it is up against the right margin. We'll use 6.69".
Highlight the entire document. Control A
On the Home tab, Paragraph box, click the tiny icon in the lower right corner of the Paragraph box. This will open the Paragraph window.
In the lower-left corner of the Paragraph window, click the Tab button.
Enter 6.96 into the Tab stop position box.
Click Right for Alignment.
Select 2 for Leader.
Click Set.
Click OK
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find string, Replace with dot tab Wildcard replace any string in context with a specified string wardw Word 7 05-07-2018 09:13 AM
Find string, Replace with dot tab Code to find numerical string + space throughout document & replace them with Comma Robert Kay Word VBA 6 02-21-2018 04:41 PM
How to do multiple find and replace in string. PRA007 Word VBA 2 01-06-2016 09:10 PM
Find string, Replace with dot tab Find and replace a string of text errtu Word 1 01-31-2013 02:09 PM
Find string, Replace with dot tab Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

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