Help!

how can I hide text and preserve spacing?

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> MailMerge Fields RSS
Next:  if conditions, and statements  
Author Message
Sparksew
External


Since: Oct 04, 2009
Posts: 3



PostPosted: Sun Oct 04, 2009 7:19 pm    Post subject: how can I hide text and preserve spacing?
Archived from groups: microsoft>public>word>mailmerge>fields (more info?)

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.
Back to top
Peter Jamieson
External


Since: Jan 15, 2009
Posts: 94



PostPosted: Mon Oct 05, 2009 5:10 am    Post subject: Re: how can I hide text and preserve spacing? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
Back to top
Graham Mayor
External


Since: Jul 04, 2006
Posts: 4677



PostPosted: Mon Oct 05, 2009 5:10 am    Post subject: Re: how can I hide text and preserve spacing? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
Back to top
Sparksew
External


Since: Oct 04, 2009
Posts: 3



PostPosted: Tue Oct 20, 2009 8:45 am    Post subject: RE: how can I hide text and preserve spacing? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"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.
Back to top
Sparksew
External


Since: Oct 04, 2009
Posts: 3



PostPosted: Tue Oct 20, 2009 10:24 am    Post subject: RE: how can I hide text and preserve spacing? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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, "
Back to top
Peter Jamieson
External


Since: Jan 15, 2009
Posts: 94



PostPosted: Tue Oct 20, 2009 2:10 pm    Post subject: Re: how can I hide text and preserve spacing? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> MailMerge Fields All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum