Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2024, 10:17 AM
drf drf is offline How to replace all letters (but not numbers) in a Word file to letters 'x'? Windows 7 64bit How to replace all letters (but not numbers) in a Word file to letters 'x'? Office 2013
Novice
How to replace all letters (but not numbers) in a Word file to letters 'x'?
 
Join Date: Oct 2024
Posts: 1
drf is on a distinguished road
Default How to replace all letters (but not numbers) in a Word file to letters 'x'?

Hi,



I need to replace all letters (but not numbers and not spaces, and not commas, and not dots) in a Word file to 'x' letters, but I want the formating and numbers and punctuation marks to be preserved.

How can I do it? I tried using wildcard *, but then there was a wall of continuous xxxxxxxxx without any spaces and also the formatting was lost.

The purpose of this is to show how many pages of text there are in the file without revealing that text and without losing the format, so that the number of pages remain correct. Also the dates present in the text should be preserved.
Reply With Quote
  #2  
Old 10-23-2024, 10:32 AM
Italophile Italophile is offline How to replace all letters (but not numbers) in a Word file to letters 'x'? Windows 11 How to replace all letters (but not numbers) in a Word file to letters 'x'? Office 2021
Expert
 
Join Date: Mar 2022
Posts: 539
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Unless you are using a fixed width font that process is unlikely to work.

Replacing wide letters, such as w or m, or narrow letters, such as i, with x will alter the overall length of the text, resulting in the document being repaginated with the possible result that it will have fewer pages.

For detailed help on using wildcards in Word find see https://wordmvp.com/FAQs/General/UsingWildcards.htm
Reply With Quote
  #3  
Old 10-23-2024, 02:19 PM
macropod's Avatar
macropod macropod is offline How to replace all letters (but not numbers) in a Word file to letters 'x'? Windows 10 How to replace all letters (but not numbers) in a Word file to letters 'x'? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,370
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

Replacing existing content with strings of x will surely mess up the document layout - for the simple reason that, unless you're using a fixed width font, the x strings are unlikely to be the same overall width as the strings they replace. For what you want, see the Redact a Word Document 'Sticky' thread at the top of the Word VBA forum: https://www.msofficeforums.com/word-...-document.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
change footnote numbers to letters doctorduncan Word 2 09-30-2023 02:08 AM
How to replace all letters (but not numbers) in a Word file to letters 'x'? Descenders of letters chopped off when I save a Word file as a PDF Sasha AD Word 5 12-03-2019 06:42 AM
Prefixing heading numbers with custom letters, varying by section, in Microsoft Word? JoelMarcey Word 0 07-23-2011 08:51 AM
How to replace all letters (but not numbers) in a Word file to letters 'x'? Creating TOC with letters and numbers tanababa Word 1 04-28-2011 01:35 AM
mailmerge with letters of a different numbers of pages roel1972 Mail Merge 0 02-21-2011 11:45 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:52 PM.


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