View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default how can I hide text and preserve spacing?

I may be missing something here, but why not use spaces rather than text
characters?

The other approach would be to merge to a new document and correct it with
vba. Assuming that the Mmm is always preceded and followed by a number and a
space - as "00 Mmm 1953" then the following will recolour Mmm white

http://www.gmayor.com/installing_macro.htm

Sub MaskMMM()
Dim oRng As Range
With Selection
'Start at the top of the document
.HomeKey wdStory
With .Find
'Find each instance of the search string
While .Execute("[0-9] Mmm [0-9]", _
MatchWildcards:=True) 'with wildcards set
'mark the found text as a range
Set oRng = Selection.Range
With oRng
'move the start of the range to exclude the number
.Start = .Start + 1
'move the end of the range to exclude the number
.End = .End - 1
'colour the range white
.Font.Color = wdColorWhite
'and remove the spell check error from the characters
.NoProofing = True
End With
Wend
End With
End With
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Sparksew wrote:
I am using Word Pro 2003 and trying to merge my database, but white
characters in the database are printing in black, although I am using
them to preserve spacing as in "00 Mmm 1953" where the "00 Mmm" are
white characters. My present approach is not working. Suggestions
welcome. I'm not using VB and would have a learning curve to try to
set it up for this purpose.