A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Retrieving part of a field.



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2010, 08:33 PM posted to microsoft.public.word.mailmerge.fields
mikk
external usenet poster
 
Posts: 3
Default Retrieving part of a field.


Two questions on returning only part of a field;
1) Is there a switch or other devise to take the field {middle_name} and
return only the first letter? I have created a new field in Access that does
this, and I can just merge that, but I want to know if WORD is capable of
doing it instead.

2) I have an outline with the number format “First: Second: etc”. I also
have a cross-reference in the document to those numbers. Is there a way to
have the result not include the colon? ie. print all except the last
character “:”

  #2  
Old April 9th, 2010, 08:49 PM posted to microsoft.public.word.mailmerge.fields
mikk
external usenet poster
 
Posts: 3
Default Retrieving part of a field.



For 2), I know that I could do it with a long series of IF fields, (one for
each number) but I don't want to do it that way.
  #3  
Old April 9th, 2010, 09:56 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Retrieving part of a field.

1) Is there a switch or other devise to take the field {middle_name} and
return only the first letter? I have created a new field in Access

that does
this, and I can just merge that, but I want to know if WORD is capable of
doing it instead.


Word's "Field language" doesn't give you any facilities that help, but
with an Access data source you can either define a query in Access, or
use Word VBA to connect to Access with a suitable query, both of which
avoid having to create and maintain an extra field in an Access table,
if that is your concern.

2) I have an outline with the number format “First: Second: etc”.

I also
have a cross-reference in the document to those numbers. Is there a

way to
have the result not include the colon? ie. print all except the last
character “:”


if it's in the context of a merge, then the problem is that the REF
fields used to insert references are destroyed during a merge.

If it has nothing to do with a merge, then you could consider using
sequencing built using SEQ fields, e.g.

{ QUOTE "{ SEQ x \*ordtext }:" }

(e.g. with a tab character after the colon), then for those paragraphs
that you want to reference, decide on a name, e.g. "myref", then put the
following in the referenced paragraph:

{ SEQ x \c \*ordtext \h }

and use

{ REF myref } where you want to put the reference.

The sequencing is obviously less automatic, but the way REFerences to
sequenced items work is not particularly automatic anyway and there is
something to be said for naming your own reference points rather than
relying on the arbitrary references generated by Word.

Peter Jamieson

http://tips.pjmsn.me.uk

On 09/04/2010 20:33, Mikk wrote:

Two questions on returning only part of a field;
1) Is there a switch or other devise to take the field {middle_name} and
return only the first letter? I have created a new field in Access that does
this, and I can just merge that, but I want to know if WORD is capable of
doing it instead.

2) I have an outline with the number format “First: Second: etc”. I also
have a cross-reference in the document to those numbers. Is there a way to
have the result not include the colon? ie. print all except the last
character “:”

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.