Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sparksew Sparksew is offline
external usenet poster
 
Posts: 3
Default how can I hide text and preserve spacing?

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.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default how can I hide text and preserve spacing?

Formatting such as colouring applied in the source is not preserved when
you use MERGEFIELD fields.

Quesion 1 is whether having "00 Xxx" in your data source will really
help "preserve the spacing." It depends on what you are trying to do.
With vriable-width fonts the various month abbreviations would not have
the same widths anyway, and with Fixed-width fonts you could use tabs
or, a number of ordinary space characters etc. to do the spacing.

However, assuming you have what you want...

For the following, ensure the mail merge toolbar is enabled (e.g. in
View-Toolbars). Suppose your field is called myfield. Use Alt-F9 to
display the field codes.

You'll probably see either this:
{ MERGEFIELD myfield }

or this:
{ MERGEFIELD myfield \*MERGEFORMAT }

Then try this:

If you see
{ MERGEFIELD myfield }

type in that \*MEREGFORMAT

then you should be able to
a. use Alt-F9 to display the field results again
b. if you are seeing myfield, find the "Preview results" button in
the toolbar and click it so you see, e.g.
00 Mmm 1953
c. Format the 00 Mmm as white text
d. see if the white text is preserved when you preview different
records or complete the merge.

Other possible approaches:
1. If the data source is a Word document, then change MERGEFIELD to
REF (and remove the \*MERGEFORMAT if it is there) so you have

{ REF myfield }

2. As long as all the dates in your data source are real dates, not
really "00 Xxx", you could use

{ MERGEFIELD myfield \@"DD MMM " }

to pick out the day/month part and

{ MERGEFIELD myfield \@"YYYY" }

to pick out the year, and format them appropriately. If necessary, you
can format the "M" or MERGEFIELD as white and use

{ MERGEFIELD myfield \@"DD MMM " \*Charformat }

for the first one.


Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

On 05/10/2009 03:19, 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.

  #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.



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sparksew Sparksew is offline
external usenet poster
 
Posts: 3
Default how can I hide text and preserve spacing?



"Sparksew" wrote:

After trying the solutions offered I found that the only solution that works
for me is to insert a period before any spacing and then follow it with text
or a final period.
As in: Jun 1996 type ,. Jun 1996, or for a totally blank field I typed
,. ., or for a field with just a year ,. 1996,
(In this case, as in the first example. there is no need to enter a second
period as any text present serves the same purpose as a placeholder.)
Ideally, I would like to be able to use a non-printing character that would
preserve the function of the period.
I used comma separated fields in the Data Source document.
The final printout includes the period as a placeholder which is not
objectionable.

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default how can I hide text and preserve spacing?

Having spaces as placeholders at the beginning of a field value won't
work in most types of data source because the mechanism(s) used to
deliver the data to Word tend(s) to strip leading (and trailing) spaces.

If I put any of the Unicode characters 8204,8205,8206,8207 (non-break
optional space, non-break no space, left-to-right mark and right-to-left
mark) at the beginning of a field value in Excel (2007), spaces
immediately afterwards are preserved (but they aren't after a non-break
space, character 160 i think). That also works in a Word (2007) data
source. However, whether it will work with your data source (I don't
think you have said what it is) or in your version of Word (ditto), or
whether you can even get them into your data source is another question.
Some of these characters may have an unwanted impact on Word (i.e. I'd
probably avoid the left-to-right and right-to-left marks).

Nor can you use any of these characters as "space substitutes" because
they don't - or shouldn't - occupy any space in the printed document.
You can only use them to stop other spaces being ditched.


Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

On 20/10/2009 16:45, Sparksew wrote:


"Sparksew" wrote:

After trying the solutions offered I found that the only solution that works
for me is to insert a period before any spacing and then follow it with text
or a final period.
As in: Jun 1996 type ,. Jun 1996, or for a totally blank field I typed
,. ., or for a field with just a year ,. 1996,
(In this case, as in the first example. there is no need to enter a second
period as any text present serves the same purpose as a placeholder.)
Ideally, I would like to be able to use a non-printing character that would
preserve the function of the period.
I used comma separated fields in the Data Source document.
The final printout includes the period as a placeholder which is not
objectionable.



  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sparksew Sparksew is offline
external usenet poster
 
Posts: 3
Default how can I hide text and preserve spacing?


The lines for illustration noted above should have had the spaces preserved.
I did not think to enclose the sentence within quotes and the result was MS
stripped out the spaces when posted.

" As in: Jun 1996 type ,. Jun 1996, or for a totally blank field I typed
,. ., or for a field with just a year ,. 1996, "

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hide all text between [ ] (square brackets) and hide thebrackets. jbesr1230 Microsoft Word Help 1 April 9th 08 06:20 AM
Remove the codes, preserve the text Wallace Microsoft Word Help 3 November 28th 07 04:52 AM
preserve/keep original vertical spacing and layout after deleting paragraph or sentences [email protected] New Users 1 April 15th 06 09:02 PM
How do I hide text (Word) but keep spacing as if text is there? Heidi Microsoft Word Help 6 August 19th 05 02:13 AM
Hide text from printing - can view text on document Shannon T Microsoft Word Help 2 December 28th 04 07:20 PM


All times are GMT +1. The time now is 11:02 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"